-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Enhance ShaderLab documents #2331
Conversation
WalkthroughThis update enhances the clarity and professionalism of the Galacean engine's shader documentation by standardizing terminology, improving formatting, and ensuring consistency across various shader types. Key terms have been refined, comments translated to English, and structural adjustments made for better readability, all while maintaining the original functionality and content. Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- docs/en/graphics/shader/builtins/intro.mdx (1 hunks)
- docs/en/graphics/shader/shaderLab/syntax/pass.mdx (3 hunks)
- docs/en/graphics/shader/shaderLab/syntax/shader.mdx (5 hunks)
- docs/zh/graphics/shader/builtins/intro.mdx (2 hunks)
- docs/zh/graphics/shader/shaderLab/syntax/pass.mdx (3 hunks)
- docs/zh/graphics/shader/shaderLab/syntax/shader.mdx (1 hunks)
Files skipped from review due to trivial changes (5)
- docs/en/graphics/shader/builtins/intro.mdx
- docs/en/graphics/shader/shaderLab/syntax/pass.mdx
- docs/en/graphics/shader/shaderLab/syntax/shader.mdx
- docs/zh/graphics/shader/builtins/intro.mdx
- docs/zh/graphics/shader/shaderLab/syntax/pass.mdx
Additional comments not posted (4)
docs/zh/graphics/shader/shaderLab/syntax/shader.mdx (4)
107-109
: Improved Clarity in Rendering States Section.The reorganization into separate subsections for each rendering state enhances clarity and readability. The consistent format across subsections is beneficial.
175-201
: Clear Explanation of BlendState Assignment Methods.The example and accompanying explanation effectively clarify the distinction between constant and variable assignments. This enhances the user's understanding of practical implementation.
202-210
: Concise Explanation of Structs, Functions, and Single Variables.The section provides a clear and concise explanation, aligning with GLSL syntax. The example for single variable declaration is accurate and helpful.
212-212
: Clear Explanation of Global Variable Scope and Overriding.The notes provide a clear and valuable explanation of the scope and overriding principles for global variables in ShaderLab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (3)
docs/zh/graphics/shader/shaderLab/syntax/pass.mdx (3)
31-33
: Improve code snippet formatting.The code snippet for
BlendState
should be formatted consistently with other code snippets in the document.BlendState = blendState;Consider using a code block for better readability:
BlendState = blendState;
37-41
: Improve code snippet formatting.The code snippet for
BlendState
declaration should be formatted consistently with other code snippets in the document.BlendState { 渲染状态属性 = 属性值; }Consider using a code block for better readability:
BlendState { 渲染状态属性 = 属性值; }
88-101
: Add missing code block formatting.The new section providing additional information about setting render states and render queues through the material API should use code blocks for better readability.
<Callout type="info"> 除了可以在 ShaderLab 中对渲染状态和渲染队列进行设置,开发者同样可以通过材质的API进行设置,如 ```ts // 渲染队列设置 material.renderQueueType = RenderQueueType.Opaque; // 渲染状态设置 const renderState = material.renderState.depthState; depthState.writeEnabled = false;当 ShaderLab 中声明了渲染状态和渲染队列,材质相应的设置会被忽略。
Consider using a code block for better readability: ```diff <Callout type="info"> 除了可以在 ShaderLab 中对渲染状态和渲染队列进行设置,开发者同样可以通过材质的API进行设置,如 ```ts // 渲染队列设置 material.renderQueueType = RenderQueueType.Opaque; // 渲染状态设置 const renderState = material.renderState.depthState; depthState.writeEnabled = false;
当 ShaderLab 中声明了渲染状态和渲染队列,材质相应的设置会被忽略。
</blockquote></details> </blockquote></details> <details> <summary>Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** <details> <summary>Commits</summary> Files that changed from the base of the PR and between b18317ade8e85c23995b81af64b8c71df90cfdaa and 62ef48357b1b035951c1d6b0a1b40cc0c3ef020e. </details> <details> <summary>Files selected for processing (2)</summary> * docs/en/graphics/shader/shaderLab/syntax/pass.mdx (4 hunks) * docs/zh/graphics/shader/shaderLab/syntax/pass.mdx (3 hunks) </details> <details> <summary>Files skipped from review due to trivial changes (1)</summary> * docs/en/graphics/shader/shaderLab/syntax/pass.mdx </details> <details> <summary>Additional comments not posted (1)</summary><blockquote> <details> <summary>docs/zh/graphics/shader/shaderLab/syntax/pass.mdx (1)</summary><blockquote> `56-66`: **Enhance clarity of varying variable declaration.** The explanation regarding the declaration of varying variables has been refined by adding a link to the structure function documentation, improving the contextual understanding for users. The code changes are approved. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- docs/en/graphics/shader/shaderLab/syntax/pass.mdx (4 hunks)
Files skipped from review due to trivial changes (1)
- docs/en/graphics/shader/shaderLab/syntax/pass.mdx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Please check if the PR fulfills these requirements
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