Closed Sway007 closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 69.49%. Comparing base (
f3400c8
) to head (a69da3e
). Report is 45 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The changes in this pull request involve modifications to the ShaderContentParser
class in ShaderContentParser.ts
to improve the encapsulation of symbol tables during shader pass parsing. A new scope is created at the beginning of the _parsePass
method. Additionally, a new BlendState
configuration named transparentBlendState
is introduced in the shader code for the "Triangle" shader, which is applied to two passes, enhancing color blending control. Minor formatting updates have also been made in examples/shader-lab-multi-pass.ts
.
File Path | Change Summary |
---|---|
packages/shader-lab/src/contentParser/ShaderContentParser.ts |
Updated _parsePass method to create a new scope for encapsulation; modified method signature. |
tests/src/shader-lab/shaders/multi-pass.shader |
Introduced transparentBlendState and applied it to passes "0" and "1" in the "Triangle" shader. |
examples/shader-lab-multi-pass.ts |
Standardized string delimiters to double quotes; made minor logic adjustments without altering functionality. |
Shader.ts
regarding the handling of RenderState
are related to the overall functionality of shader passes, which is also a focus of the main PR's modifications to the ShaderContentParser
class.enhancement
In a world of shaders, bright and grand,
A rabbit hops with a brush in hand.
New scopes to guard, blending so fine,
WithtransparentBlendState
, colors align.
Hooray for the passes, let rendering play,
In the land of pixels, we dance and sway! 🐇✨
examples/shader-lab-multi-pass.ts
[error] 179-179: The assignment should not be in an expression. The use of assignments in expressions is confusing. Expressions are often considered as side-effect free. (lint/suspicious/noAssignInExpressions)
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Fix scope loss bug when parse
Pass
scope. A new symbol table should be created forPass
scope.Summary by CodeRabbit
New Features
BlendState
configuration for enhanced color blending in the "Triangle" shader.Bug Fixes
Style