Closed Sway007 closed 1 week ago
Attention: Patch coverage is 61.53846%
with 10 lines
in your changes missing coverage. Please review.
Project coverage is 66.88%. Comparing base (
14027ac
) to head (2749c76
). Report is 1 commits behind head on dev/1.4.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The changes in this pull request involve the addition of a new keyword GS_Editor
to the EKeyword
enum in Keywords.ts
, and its corresponding mapping in KeywordMap.ts
. The shader parsing logic in ShaderContentParser.ts
has been updated to handle this new keyword. Additionally, various error handling mechanisms across several files have been modified to improve robustness and type safety, including changes in error reporting and logging in the ShaderLab
class and related utility classes.
File Path | Change Summary |
---|---|
packages/shader-lab/src/common/Keywords.ts |
Added new enum entry: GS_Editor in EKeyword . |
packages/shader-lab/src/contentParser/KeywordMap.ts |
Added new entry: ["Editor", EKeyword.GS_Editor] in KeywordMap . |
packages/shader-lab/src/contentParser/ShaderContentParser.ts |
Updated _parseShaderStatements to handle EKeyword.GS_Editor , modified error handling for render queue assignments. |
packages/shader-lab/src/preprocessor/PpParser.ts |
Removed _skipEditorBlock , simplified _onToken to directly invoke _expandToken , updated error reporting logic. |
packages/shader-lab/src/ShaderLab.ts |
Enhanced error handling and logging in _parseShaderPass and _parseShaderContent . |
packages/shader-lab/src/ShaderLabUtils.ts |
Changed return type of createGSError method from implicit to Error , modified error handling logic. |
packages/shader-lab/src/parser/ShaderTargetParser.ts |
Updated error handling in parse method to cast errors to GSError . |
packages/shader-lab/src/codeGen/VisitorContext.ts |
Updated return types of referenceAttribute and referenceVarying methods from GSError to Error . |
packages/shader-lab/src/codeGen/CodeGenVisitor.ts |
Introduced type assertions for error handling in visitPostfixExpression and visitFunctionCall methods. |
tests/src/shader-lab/ShaderLab.test.ts |
Added multiple test cases for shader validation, updated error handling expectations in tests. |
ShaderLab
class, which is directly related to the changes made in the main PR that introduces the GS_Editor
keyword and its handling in the shader parsing process.ShaderContentParser
class, which is relevant as the main PR also involves changes to the ShaderContentParser
for handling the new GS_Editor
keyword.MaterialLoader
, which may interact with the changes in the main PR regarding shader keywords and their processing in the context of materials.medium priority
🐰 In the shader land, a new keyword's born,
WithGS_Editor
, the shaders adorn.
Parsing and mapping, errors now tamed,
In the code's bright garden, all is proclaimed!
So hop with delight, let the shaders play,
For bright new paths are paved today! 🌟
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?
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
related editor issue galacean/editor#2877
ShaderLab compiler ignore
Editor
module like belowFix
RenderQueueType
variable assignment bug inShaderLab
Remove duplicate code skip process.
Editor block code skip process is performed in
ShaderContentParser
andPpParser
Summary by CodeRabbit
Release Notes
New Features
GS_Editor
keyword to enhance shader processing capabilities.Editor
keyword in the keyword mapping system.Bug Fixes
Tests
Documentation