Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add advanced shader docs #2295

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Conversation

hhhhkrx
Copy link
Contributor

@hhhhkrx hhhhkrx commented Aug 5, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Summary by CodeRabbit

  • New Features
    • Added comprehensive documentation for new shaders: eye, hair, skin, and thin film interference.
    • Each shader documentation includes practical examples, parameter descriptions, and visual aids to enhance understanding.
    • Guides provided for importing shader examples within the Galacean editor, facilitating user implementation and customization.
  • Enhancements
    • Improved localization support by adding new terminology in Chinese related to graphics and rendering.

Copy link

coderabbitai bot commented Aug 5, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The recent documentation updates introduce comprehensive guides for various shaders, including eye, hair, skin, and thin film interference shaders. Each guide details shader functionalities, parameters, and practical usage within the Galacean editor, enhanced with visual aids. This structured documentation aims to empower users in developing realistic graphical representations in their projects.

Changes

Files Change Summary
docs/zh/graphics/shader/builtins/eye.mdx New documentation for an eye shader, detailing UV mapping, parameters, and anatomical breakdowns.
docs/zh/graphics/shader/builtins/hair.mdx New documentation on hair shader based on Kajiya-Kay model, including parameters and import guides.
docs/zh/graphics/shader/builtins/skin.mdx New skin shader documentation using Spherical Gaussian model, with customization options and comparisons.
docs/zh/graphics/shader/builtins/thin.mdx New guide on thin film interference shaders, including parameter descriptions and visual comparisons.
docs/zh/graphics/shader/builtins/_meta.json Added translations for "thin" and "digitalHuman" to enhance localization for Chinese-speaking users.

Poem

🐰 In the land of shaders, bright and bold,
New guides emerge, their stories told.
Eyes that sparkle, hair that flows,
Skin like velvet, where realism grows.
Thin films gleam in the light’s soft dance,
Let’s hop along, give these shaders a chance! 🌈


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@hhhhkrx hhhhkrx added the documentation Improvements or additions to documentation label Aug 5, 2024
@cptbtptpbcptdtptp cptbtptpbcptdtptp added this to the 1.3 milestone Aug 5, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dc05369 and 2baa2db.

Files selected for processing (4)
  • docs/zh/graphics/shader/builtins/eye.mdx (1 hunks)
  • docs/zh/graphics/shader/builtins/hair.mdx (1 hunks)
  • docs/zh/graphics/shader/builtins/skin.mdx (1 hunks)
  • docs/zh/graphics/shader/builtins/thin.mdx (1 hunks)
Additional context used
LanguageTool
docs/zh/graphics/shader/builtins/eye.mdx

[uncategorized] ~5-~5: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:真实"地"渲染
Context: --- title: 眼睛着色器 --- 眼睛着色器为眼球模型提供真实的渲染,使你的创作呈现逼真的艺术效果。 <img src="https://md...

(wb4)


[uncategorized] ~22-~22: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"使用
Context: ...ject**。 ## 眼球剖析 在开始渲染眼睛前,熟悉眼球的生物结构以便更好的使用着色器。 | 参数 | ...

(wb4)

Additional comments not posted (16)
docs/zh/graphics/shader/builtins/skin.mdx (4)

16-23: LGTM!

The material properties section is clear and well-structured.


1-7: Verify the image link.

Ensure that the image link is accessible and displays correctly.

Verification successful

The image link is accessible and returns an HTTP status 200.

  • The image link in the markdown file is valid and should display correctly.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image link.

# Test: Fetch the image URL. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*ynWiSp_2n90AAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 771


9-14: Verify the project link.

Ensure that the project link is accessible and leads to the correct page.

Verification successful

The project link is valid and accessible.

The URL https://galacean.antgroup.com/editor/projects returned an HTTP status 200, confirming that the link is accessible and leads to the correct page.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the project link.

# Test: Fetch the project URL. Expect: HTTP status 200.
curl -I "https://galacean.antgroup.com/editor/projects" | grep "HTTP/2 200"

Length of output: 720


24-31: Verify the image links.

Ensure that the image links are accessible and display correctly.

Verification successful

The image links are accessible and display correctly.

  • Both image URLs returned HTTP status 200, confirming their accessibility.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image links.

# Test: Fetch the image URLs. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*NLyOR71_nj4AAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*xfl_Ra0oj0AAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 1307

docs/zh/graphics/shader/builtins/hair.mdx (4)

19-31: LGTM!

The material properties section is clear and well-structured.


16-17: Verify the image link.

Ensure that the image link is accessible and displays correctly.

Verification successful

Image link is accessible.

The image link in the documentation is accessible and returns the expected HTTP status 200.

  • docs/zh/graphics/shader/builtins/hair.mdx, lines 16-17
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image link.

# Test: Fetch the image URL. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*IZrjTY7JbfkAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 455


1-7: Verify the image link.

Ensure that the image link is accessible and displays correctly.

Verification successful

The image link is accessible.

The image URL provided in the documentation returns an HTTP status 200, indicating that the image is accessible and displays correctly.

  • File: docs/zh/graphics/shader/builtins/hair.mdx
  • Lines: 1-7
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image link.

# Test: Fetch the image URL. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*k7t9RbgNMOIAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 455


9-14: Verify the project link.

Ensure that the project link is accessible and leads to the correct page.

Verification successful

The project link is accessible and functional.

The link provided in the documentation correctly leads to the intended page.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the project link.

# Test: Fetch the project URL. Expect: HTTP status 200.
curl -I "https://galacean.antgroup.com/editor/projects" | grep "HTTP/2 200"

Length of output: 483

docs/zh/graphics/shader/builtins/thin.mdx (4)

21-27: LGTM!

The material properties section is clear and well-structured.


1-7: Verify the image link.

Ensure that the image link is accessible and displays correctly.

Verification successful

Image link verified.

The image link is accessible and returns an HTTP/2 200 status.

  • docs/zh/graphics/shader/builtins/thin.mdx, lines 1-7
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image link.

# Test: Fetch the image URL. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*taABSY4nUcEAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 929


29-35: Verify the image links.

Ensure that the image links are accessible and display correctly.

Verification successful

Image links are accessible and display correctly.

The image links in the code snippet return HTTP status 200, confirming their accessibility.

  • https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*opDFQY6Cu1EAAAAAAAAAAAAADgDwAQ/original
  • https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*bfIhRIAinRIAAAAAAAAAAAAADgDwAQ/original
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the image links.

# Test: Fetch the image URLs. Expect: HTTP status 200.
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*opDFQY6Cu1EAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"
curl -I "https://mdn.alipayobjects.com/huamei_9ahbho/afts/img/A*bfIhRIAinRIAAAAAAAAAAAAADgDwAQ/original" | grep "HTTP/2 200"

Length of output: 1228


14-19: Verify the project link.

Ensure that the project link is accessible and leads to the correct page.

Verification successful

The project link is accessible and leads to the correct page.

  • The link provided in the documentation returns an HTTP status 200, indicating that it is accessible.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of the project link.

# Test: Fetch the project URL. Expect: HTTP status 200.
curl -I "https://galacean.antgroup.com/editor/projects" | grep "HTTP/2 200"

Length of output: 799

docs/zh/graphics/shader/builtins/eye.mdx (4)

9-11: Informative callout.

The callout provides useful information about the shader's dependency on the model's UV and links to additional resources.


13-18: Clear instructions for importing the eye example.

The section provides clear and concise steps to import an eye example in the Galacean editor.


32-41: Detailed descriptions of eye textures.

The section provides clear and detailed descriptions of various textures used in the eye shader.


42-54: Detailed descriptions of material properties.

The section provides clear and detailed descriptions of various material properties of the eye shader.

title: 眼睛着色器
---

眼睛着色器为眼球模型提供真实的渲染,使你的创作呈现逼真的艺术效果。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix grammatical issue.

The sentence should use "地" to modify the verb.

- 眼睛着色器为眼球模型提供真实的渲染,使你的创作呈现逼真的艺术效果。
+ 眼睛着色器为眼球模型提供真实地渲染,使你的创作呈现逼真的艺术效果。
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
眼睛着色器为眼球模型提供真实的渲染,使你的创作呈现逼真的艺术效果。
眼睛着色器为眼球模型提供真实地渲染,使你的创作呈现逼真的艺术效果。
Tools
LanguageTool

[uncategorized] ~5-~5: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:真实"地"渲染
Context: --- title: 眼睛着色器 --- 眼睛着色器为眼球模型提供真实的渲染,使你的创作呈现逼真的艺术效果。 <img src="https://md...

(wb4)


## 眼球剖析

在开始渲染眼睛前,熟悉眼球的生物结构以便更好的使用着色器。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix grammatical issue.

The sentence should use "地" to modify the verb.

- 在开始渲染眼睛前,熟悉眼球的生物结构以便更好的使用着色器。
+ 在开始渲染眼睛前,熟悉眼球的生物结构以便更好地使用着色器。
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
在开始渲染眼睛前,熟悉眼球的生物结构以便更好的使用着色器
在开始渲染眼睛前,熟悉眼球的生物结构以便更好地使用着色器
Tools
LanguageTool

[uncategorized] ~22-~22: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"使用
Context: ...ject**。 ## 眼球剖析 在开始渲染眼睛前,熟悉眼球的生物结构以便更好的使用着色器。 | 参数 | ...

(wb4)

* feat: update doc
Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@cptbtptpbcptdtptp cptbtptpbcptdtptp merged commit 92cc99b into galacean:main Aug 5, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants