-
-
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
[Document] post-processing related #2511
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request involves comprehensive documentation updates across multiple files related to post-processing and scene management. The changes primarily focus on enhancing documentation for post-processing features, introducing new classes for custom post-processing, updating camera component properties, and refining documentation structure in both English and Chinese versions. The updates include adding a new Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2511 +/- ##
==========================================
+ Coverage 68.52% 68.55% +0.03%
==========================================
Files 957 957
Lines 100041 100052 +11
Branches 8544 8559 +15
==========================================
+ Hits 68555 68593 +38
+ Misses 31230 31203 -27
Partials 256 256
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
🧹 Nitpick comments (9)
docs/zh/graphics/postProcess/postProcess.mdx (1)
44-44
: Consider revising the Chinese grammar.The phrase "具体的后处理" should be "具体地后处理" as it modifies a verb.
-具体的后处理效果配置,请参考 [后处理效果列表] +具体地后处理效果配置,请参考 [后处理效果列表]🧰 Tools
🪛 LanguageTool
[uncategorized] ~44-~44: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:具体"地"后处理
Context: ...4.51.12.gif" /> 具体的后处理效果配置,请参考 [后处理效果列表](/docs/graphics/pos...(wb4)
docs/en/graphics/postProcess/postProcess.mdx (1)
57-57
: Standardize the spelling of "anti-aliasing".The term "anti-aliasing" should be spelled without a hyphen as "antialiasing" for consistency with technical documentation standards.
-multi-sampling anti-aliasing settings +multi-sampling antialiasing settingsAlso applies to: 77-77
🧰 Tools
🪛 LanguageTool
[misspelling] ~57-~57: This word is normally spelled as one.
Context: ...aaSamples) | Adjusts the multi-sampling anti-aliasing settings to improve image quality, such...(EN_COMPOUNDS_ANTI_ALIASING)
docs/en/graphics/postProcess/customPostProcess.mdx (5)
6-10
: Consider enhancing the introduction with use cases.While the technical explanation is clear, it would be helpful to add examples of when custom post-processing might be needed (e.g., night vision effects, color grading, etc.) to help readers understand the practical applications.
45-45
: Add comments explaining the grayscale coefficients.The line uses standard luminance coefficients (0.299, 0.587, 0.114) for RGB to grayscale conversion. Consider adding a comment explaining these coefficients and why they're used instead of a simple average.
65-67
: Consider adding error handling for texture operations.The
onRender
method should include error handling for cases wheresrcTexture
might be null or invalid, as this could happen in edge cases during scene transitions or resource loading.
102-103
: Consider using a lower default intensity value.The default intensity of 0.8 might be too strong for most use cases. Consider using a more moderate default value (e.g., 0.5) to provide a better out-of-the-box experience.
141-141
: Consider adding a performance optimization note.The
mix
operation is performed on every pixel. For large viewports, you might want to add a note about the potential performance impact and suggest optimizations (e.g., using a lower resolution render target for the effect).docs/en/graphics/camera/component.md (1)
84-84
: Enhance postProcessMask property documentation.Consider adding:
- Examples of common mask values
- How to combine multiple masks
- Default value and behavior
docs/en/core/scene.md (1)
157-159
: Remove empty code block.The empty code block at the end of the file serves no purpose and should be removed.
🧰 Tools
🪛 Markdownlint (0.37.0)
158-158: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
docs/en/core/scene.md
(5 hunks)docs/en/graphics/camera/component.md
(1 hunks)docs/en/graphics/postProcess/customPostProcess.mdx
(1 hunks)docs/en/graphics/postProcess/postProcess.mdx
(1 hunks)docs/zh/core/scene.md
(4 hunks)docs/zh/graphics/camera/component.md
(1 hunks)docs/zh/graphics/postProcess/customPostProcess.mdx
(1 hunks)docs/zh/graphics/postProcess/postProcess.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/graphics/postProcess/customPostProcess.mdx
[style] ~25-~25: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... The algorithm is not special, but you need to pay attention to renderer_BlitTexture
...
(REP_NEED_TO_VB)
[style] ~80-~80: This phrasing could be wordy, so try replacing it with something more concise.
Context: ...ss logic, such as whether the intensity is greater than 0: ```ts showLineNumbers {2-9} class C...
(MORE_THAN_EXCEEDS)
[style] ~99-~99: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...intensity. The data to be fused is also very simple. The engine has encapsulated a series o...
(EN_WEAK_ADJECTIVE)
[uncategorized] ~99-~99: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...of post-processing parameters, such as [floating point type parameters](/apis/core/#PostProces...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
docs/zh/graphics/postProcess/postProcess.mdx
[uncategorized] ~44-~44: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:具体"地"后处理
Context: ...4.51.12.gif" /> 具体的后处理效果配置,请参考 [后处理效果列表](/docs/graphics/pos...
(wb4)
docs/en/graphics/postProcess/postProcess.mdx
[misspelling] ~57-~57: This word is normally spelled as one.
Context: ...aaSamples) | Adjusts the multi-sampling anti-aliasing settings to improve image quality, such...
(EN_COMPOUNDS_ANTI_ALIASING)
[misspelling] ~77-~77: This word is normally spelled as one.
Context: ...ost-processing is enabled and strict on anti-aliasing performance. The higher the value, the ...
(EN_COMPOUNDS_ANTI_ALIASING)
🪛 Markdownlint (0.37.0)
docs/en/core/scene.md
158-158: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build (22.x, windows-latest)
- GitHub Check: codecov
- GitHub Check: e2e (22.x)
🔇 Additional comments (9)
docs/zh/graphics/postProcess/postProcess.mdx (3)
6-6
: Improved clarity by focusing on camera rendering.The description now correctly emphasizes that post-processing operates on camera-rendered results rather than scene-rendered results, which is more accurate and aligns better with the actual implementation.
8-12
: Enhanced visual comparison with before/after examples.The use of the
<Comparison>
component effectively demonstrates the impact of post-processing by showing side-by-side comparisons.
19-20
: Well-structured documentation of post-processing modes and properties.The documentation clearly explains the two modes (global and local) and provides a comprehensive table of properties with detailed descriptions and API links.
Also applies to: 26-30
docs/zh/core/scene.md (2)
22-22
: Improved image reference with proper styling.The image reference includes proper styling attributes and alt text, enhancing accessibility and presentation.
44-45
: Enhanced table formatting for better readability.The table structure has been improved with consistent formatting and clear column headers.
Also applies to: 48-49
docs/en/graphics/postProcess/postProcess.mdx (1)
76-79
: Well-structured best practices section.The best practices section provides clear, actionable recommendations with performance implications and alternatives.
🧰 Tools
🪛 LanguageTool
[misspelling] ~77-~77: This word is normally spelled as one.
Context: ...ost-processing is enabled and strict on anti-aliasing performance. The higher the value, the ...(EN_COMPOUNDS_ANTI_ALIASING)
docs/zh/graphics/postProcess/customPostProcess.mdx (2)
27-49
: Well-structured shader implementation example.The shader code example is clear and includes helpful comments about the built-in
renderer_BlitTexture
variable.
82-92
: Good example of custom validation logic.The code demonstrates how to implement custom validation logic for post-processing effects, including checking both the active state and effect intensity.
docs/zh/graphics/camera/component.md (1)
84-84
: Well-documented new postProcessMask property.The new property is properly documented with a clear description and links to relevant documentation.
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
🧹 Nitpick comments (8)
docs/en/graphics/postProcess/postProcess.mdx (5)
15-30
: Well-structured configuration section with comprehensive property documentation!The clear distinction between modes and the property table greatly improves readability. Consider adding example values or default values to the property table for even better clarity.
32-47
: Consider enhancing the mixing rules example with visual aids.While the explanation is thorough, consider:
- Adding a diagram showing the blending transition in local mode
- Formatting the mixing formula using math notation (e.g., using LaTeX or similar)
66-79
: Excellent camera configuration documentation with a minor formatting suggestion.The property table provides clear descriptions with proper API links. Consider standardizing the term "anti-aliasing" to "antialiasing" throughout the documentation for consistency.
🧰 Tools
🪛 LanguageTool
[misspelling] ~74-~74: This word is normally spelled as one.
Context: ...aaSamples) | Adjusts the multi-sampling anti-aliasing settings to improve image quality, such...(EN_COMPOUNDS_ANTI_ALIASING)
81-89
: Clear viewport documentation with an important warning.Consider adding a comma after "independent" in the sentence: "The camera in the viewport is independent, but has post-processing configurations..."
🧰 Tools
🪛 LanguageTool
[uncategorized] ~83-~83: Possible missing comma found.
Context: ...he camera in the viewport is independent but has post-processing configurations simi...(AI_HYDRA_LEO_MISSING_COMMA)
91-96
: Excellent performance optimization guidelines!Consider enhancing this section by:
- Adding approximate performance impact numbers where possible
- Including device-specific recommendations (e.g., which settings work best for different mobile tiers)
🧰 Tools
🪛 LanguageTool
[misspelling] ~94-~94: This word is normally spelled as one.
Context: ...ost-processing is enabled and strict on anti-aliasing performance. The higher the value, the ...(EN_COMPOUNDS_ANTI_ALIASING)
docs/zh/graphics/postProcess/postProcess.mdx (3)
17-31
: Comprehensive configuration documentation with clear API references!The two-mode explanation and property table provide excellent technical detail. Consider adding a code example demonstrating the configuration of these properties in practice.
34-44
: Clear explanation of blending rules with practical examples!The blending behavior is well-explained with a practical example. Consider adding a visual diagram to illustrate the blending distance concept for better understanding.
59-59
: Fix grammatical structure in Chinese text.Change "具体的后处理" to "具体地后处理" to follow the correct Chinese grammar pattern for adverbial modification.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~59-~59: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:具体"地"后处理
Context: ...4.51.12.gif" /> 具体的后处理效果配置,请参考 [后处理效果列表](/docs/graphics/pos...(wb4)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/en/graphics/postProcess/postProcess.mdx
(1 hunks)docs/zh/graphics/postProcess/postProcess.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/graphics/postProcess/postProcess.mdx
[misspelling] ~74-~74: This word is normally spelled as one.
Context: ...aaSamples) | Adjusts the multi-sampling anti-aliasing settings to improve image quality, such...
(EN_COMPOUNDS_ANTI_ALIASING)
[uncategorized] ~83-~83: Possible missing comma found.
Context: ...he camera in the viewport is independent but has post-processing configurations simi...
(AI_HYDRA_LEO_MISSING_COMMA)
[misspelling] ~94-~94: This word is normally spelled as one.
Context: ...ost-processing is enabled and strict on anti-aliasing performance. The higher the value, the ...
(EN_COMPOUNDS_ANTI_ALIASING)
docs/zh/graphics/postProcess/postProcess.mdx
[uncategorized] ~59-~59: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:具体"地"后处理
Context: ...4.51.12.gif" /> 具体的后处理效果配置,请参考 [后处理效果列表](/docs/graphics/pos...
(wb4)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build (22.x, windows-latest)
- GitHub Check: e2e (22.x)
- GitHub Check: codecov
🔇 Additional comments (5)
docs/en/graphics/postProcess/postProcess.mdx (2)
6-12
: Great improvements to the introduction and visual comparison!The terminology change is more precise, and the new
Comparison
component provides a clearer before/after visualization of post-processing effects.
49-63
: Excellent component addition guide with visual demonstrations!The combination of text instructions and GIF demonstrations provides clear guidance for both preset and manual component addition.
docs/zh/graphics/postProcess/postProcess.mdx (3)
6-14
: Well-structured introduction with effective visual comparison!The terminology change from "场景渲染" to "相机渲染" provides better technical accuracy, and the before/after comparison effectively demonstrates the visual impact of post-processing.
49-72
: Excellent usage guide with clear visual demonstrations!The step-by-step instructions and property explanations are comprehensive and well-documented with supporting visuals.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~59-~59: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:具体"地"后处理
Context: ...4.51.12.gif" /> 具体的后处理效果配置,请参考 [后处理效果列表](/docs/graphics/pos...(wb4)
74-80
: Clear viewport documentation with important export behavior warning!The section effectively explains viewport-specific settings and properly warns users about the distinction between viewport display and exported results.
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
Documentation Updates
postProcessMask
propertyNew Features
Improvements