-
-
Notifications
You must be signed in to change notification settings - Fork 400
refactor(shader): migrate GLSL shaders to ShaderLab and clean up shader infrastructure #2961
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
Open
zhuxudong
wants to merge
136
commits into
galacean:dev/2.0
Choose a base branch
from
zhuxudong:refactor/glsl-to-shaderlab
base: dev/2.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 68 commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
6802991
refactor(core): migrate shaders from core/shaderlib to shader package…
zhuxudong ffb3cd2
fix(shader): move camera_ProjectionParams to Common.glsl and fix test…
zhuxudong c197623
refactor(shader): reorganize into Shaders/ + ShaderLibrary/ and migra…
zhuxudong 826abfd
fix(shader): restore original FXAA3_11.glsl and align FinalAntiAliasi…
zhuxudong ff3d86e
refactor(shader): use shared Utility UsePass for ShadowCaster/DepthOn…
zhuxudong 1dd8f99
refactor(shader): remove shader path/chunk loading and ShaderChunkLoader
zhuxudong 92b67cf
refactor(shader): sync curl noise and particle noise module from PR #…
zhuxudong b337fd8
refactor(shader): simplify registerShaders to use Shader.create directly
zhuxudong 240b166
refactor(shader): make shader package pure data and auto-register fro…
zhuxudong 9ff0d11
fix(shader): remove duplicate lowercase shaders/index.ts from git index
zhuxudong 1d10bdd
fix(shader): add RenderQueueType variable binding to ShadowCaster and…
zhuxudong 8e108e2
refactor(shader): precompile .shader files at build time and init early
zhuxudong 9031bc4
fix(shader): correct shadow sampling and BlinnPhong skinning normal t…
zhuxudong b7c1750
refactor(shader): use precompiled .gsp files for built-in shaders and…
zhuxudong a2c0286
refactor(shader): revert lazy init and migrate render states to .shader
zhuxudong 18e4c06
fix(shader): remove duplicate lowercase shader paths from git index
zhuxudong db8e322
refactor(shader): migrate render states to shaderData and fix precomp…
zhuxudong db902e7
fix(core): restore shaderLab init to _initialize to match dev/2.0
zhuxudong fa03f1b
feat(shader): add and fix Editor properties for built-in shaders
zhuxudong 752f508
fix(shader): export Particle, Trail, Skybox, SkyProcedural from /sour…
zhuxudong 2a15b7f
fix(shader): fix type resolution for .gsp imports and update types paths
zhuxudong 6629e9e
refactor(shader-lab): strip comments before preprocessing and unify c…
zhuxudong 4dbaef3
refactor(shader): auto-generate libs/index.ts, fix build pipeline, an…
zhuxudong c524e21
fix(shader): fix review issues from PR #2961 audit
zhuxudong 762e332
fix(shader): remove UIScript placeholders and export SpriteSource
zhuxudong ce62b04
refactor(shader): remove PBRSpecular shader
zhuxudong a69041d
fix(shader-lab): support macro-defined type aliases in LALR parser
zhuxudong 9aa355e
fix(test): update tests for renamed shaders and variable-bound render…
zhuxudong 1551a70
fix(shader): update include paths and UsePass refs after migration
zhuxudong f9cfd90
fix: include global.d.ts in shader types output for /sources subpath
zhuxudong c542fe4
refactor(e2e): remove engine-toolkit dependency
zhuxudong 1dd3455
refactor(shader): extract Common/Attributes.glsl from PBR
zhuxudong 0251af9
refactor(shader): remove Varyings placeholder from DepthOnly
zhuxudong 87b7557
chore: merge dev/2.0 and resolve conflicts
zhuxudong 9174bfa
Merge remote-tracking branch 'origin/dev/2.0' into refactor/glsl-to-s…
zhuxudong 95a2448
style(shader-lab): fix prettier formatting in CFG.ts
zhuxudong 13ab0a7
refactor(shader): replace inline Attributes with Common/Attributes.glsl
zhuxudong 5d356ee
refactor(e2e): migrate shaders to ShaderLab syntax
zhuxudong ed5d7b1
build(shader): update gsp precompiled outputs
zhuxudong 6dfbdac
fix(e2e): move Shader.create after engine init in opaque-texture
zhuxudong 2f1160b
fix(build): use pathToFileURL for Windows ESM import compatibility
zhuxudong 080b0e2
refactor(core): clean up dead code after shader migration
zhuxudong 89de157
docs(shader): update docs for ShaderLab migration
zhuxudong 4ef73cb
fix(test): replace stale GLSL includes in Shader.test.ts
zhuxudong b78ce6b
fix(shader): fix Windows build by normalizing path separators
zhuxudong 338f158
chore: merge dev/2.0 and resolve test conflicts
zhuxudong d349163
fix(shader): initialize render state variables for BaseMaterial and e…
zhuxudong d6bd7ff
fix(core): split constant/variable render state so Material.renderSta…
zhuxudong eb88bf5
fix(shader): remove duplicate camera_VPMat declarations in DepthOnly …
zhuxudong 10a9d82
refactor(shader): migrate Particle shaders to ShaderLab Attributes pa…
zhuxudong 99d96e1
fix(e2e): use shaderData for custom blend factors in canvas-transparency
zhuxudong c2a6842
fix(shader): remove duplicate camera_ProjectionParams in BackgroundTe…
zhuxudong 0f98d18
fix(shader): use all-variable render state for Particle and Trail sha…
zhuxudong 392c54e
fix(shader): add missing normalize for interpolated normal in BlinnPh…
zhuxudong 0ac96a2
fix(shader): remove duplicate clearCoat roughness AA factor in PBR ge…
zhuxudong 0e3988b
refactor(core): per-property render state priority with material.rend…
zhuxudong fd58554
fix(shader): use geometric TBN for clear coat normal texture
zhuxudong 326c046
fix(shader): update PBR.gsp for clear coat TBN fix
zhuxudong d7bdbe8
test(e2e): update physx-customUrl baseline after removing engine-tool…
zhuxudong e1bd8ea
test(e2e): update physx-collision baseline after removing engine-tool…
zhuxudong a2ff3b8
refactor(core): remove unused TransformFeedbackShader
zhuxudong 7d2b096
test(core): add render state priority and BaseMaterial render API tests
zhuxudong 27d797d
test(core): extend BaseMaterial with alphaCutoff branch coverage
zhuxudong 2d89bf6
refactor(shader): address review feedback on render state and PBR
zhuxudong b9e4d4f
build(shader-lab): consolidate build tooling into @galacean/engine-sh…
zhuxudong 65df8ea
docs(shader): rename shaderlab-XX tutorials to shader-XX
GuoLei1990 ee6e8c0
refactor(shader-compiler): rename ShaderLab to ShaderCompiler
GuoLei1990 ea94e41
build(shader-compiler): register project-local glsl includes during p…
zhuxudong e229654
refactor(shader-compiler): drop library option from precompile API
zhuxudong 1f17f50
chore(shader-compiler): merge dev/2.0 macro AST refactor
zhuxudong 6312a6c
fix(shader-compiler): drop dead Lexer comment-stripping override
zhuxudong bc91ce5
fix(shader-compiler): strip comments before include regex
zhuxudong 25c6fe2
refactor(shader-compiler): unify macro-as-type-alias via type_specifi…
zhuxudong 10f8870
fix(shader-compiler): bootstrap standalone runtime build for cold-sta…
zhuxudong 2a7e6b4
fix(shader-compiler): accept MACRO_CALL as declarator name
zhuxudong 93c4908
fix(shader-compiler): emit prettier-friendly libs/index.ts
zhuxudong 23dec05
fix(shader-compiler): use // prettier-ignore for libs/index.ts export…
zhuxudong 28cb88d
fix(shader-compiler): bootstrap-safe precompile (skip when runtime mi…
zhuxudong 0b9d0e2
style(shader-compiler): apply prettier wrap in bundler index
zhuxudong 70fc755
refactor(shader-compiler): unify precompile watch into startWatcher
zhuxudong 5c07850
fix(shader-compiler): emit triple-slash reference in libs/index.ts
zhuxudong 967bad8
refactor(shader-compiler): drop triple-slash hint in libs/index.ts
zhuxudong 90d39ff
refactor(shader): rename libs/ to compiled/ for clearer intent
GuoLei1990 1747515
refactor(shader): regroup Particle/Trail under Effect/ namespace
GuoLei1990 e08af33
refactor(shader): remove raw GLSL shader path
GuoLei1990 8f2da42
test(e2e): migrate raw GLSL shader cases to ShaderLab
GuoLei1990 0f6c425
refactor: migrate remaining raw GLSL Shader.create callers to ShaderLab
GuoLei1990 d21484b
refactor(shader): drop material.renderState; align render-state with …
GuoLei1990 ef118a5
test(e2e): remove redundant sphere render-state seeding in shader-ren…
GuoLei1990 95355d4
perf(shader): inline render-state resolution; drop _resolveValue and …
GuoLei1990 3de421c
test(e2e): align spriteMask-customStencil with dev/2.0 usage shape
GuoLei1990 251be3c
perf(material): cache render-state ShaderProperties; early-return in …
GuoLei1990 0c99c94
style(mask-manager): camelCase locals; unify stencil checks on explic…
GuoLei1990 20a0464
style(render-state): replace single-letter locals with descriptive names
GuoLei1990 8d61263
refactor(shader): simplify _resolveUsePass parsing
GuoLei1990 22812d1
refactor(shader): drop redundant +k coercion in _applyRenderStates
GuoLei1990 6835a70
refactor(shader): merge ShaderLib map into ShaderFactory
GuoLei1990 f1a7af0
feat(shader): restore relative-path resolution for #include
GuoLei1990 33f0318
refactor(shader): rename ShaderLibrary directory to chunks
GuoLei1990 4bb88a5
Revert "refactor(shader): rename ShaderLibrary directory to chunks"
GuoLei1990 8a529db
build(shader): auto-generate ShaderLibrary index from disk
GuoLei1990 b5706d7
refactor(shader): clean up engine-shader package layout for editor + …
GuoLei1990 59a1361
fix(shader): prevent prettier from rewriting generated source indexes
GuoLei1990 57c167b
test(e2e): bump #include paths to the new ShaderLibrary/ namespace
GuoLei1990 6f26218
revert(shader-compiler): drop bug-fix logic on top of dev/2.0 baseline
GuoLei1990 e324909
revert(shader-compiler): also drop early CFG/AST bug-fix commits
GuoLei1990 923fca1
revert(shader-compiler): drop a69041d6f ShaderTargetParser/ShaderComp…
GuoLei1990 ecf03cf
revert(shader-compiler): drop unused removeComments / skipComment hel…
GuoLei1990 3040ab5
fix(shader): restore stripped comments in ScalableAmbientOcclusion.glsl
GuoLei1990 87cb2b5
fix(shader-compiler): correct macro identifier handling and surface p…
GuoLei1990 b8b18b1
refactor(shader): unify shader-source path field across sources entry
GuoLei1990 0a269a7
chore(shader-compiler): sync TargetParser.y with CFG.ts macro-declara…
GuoLei1990 f85c7a9
fix(shader-compiler): keep sibling-arm var declaration across cross-#…
GuoLei1990 7a71057
refactor(shader): reorganize shader directory taxonomy
GuoLei1990 ea2d000
refactor(shader-compiler): decouple precompile from build artifacts v…
GuoLei1990 bd50c31
fix(test): inject ShaderFactory._includeMap when assigning Shader._sh…
GuoLei1990 7eb144f
refactor(core): consolidate ShaderFactory into shader/ and trim dead …
GuoLei1990 cae5296
refactor(shader): tighten tangent gating in PBR/BlinnPhong to skip un…
GuoLei1990 375e5c5
fix(e2e): align shader-mrt UsePass path and refresh particle baseline
GuoLei1990 68d30d8
fix(e2e): make particle shape-transform deterministic by deferring en…
GuoLei1990 7fad7d4
refactor(shader): tidy ShaderLibrary layout and drop dead Common chunks
GuoLei1990 b7db30b
refactor(shader): rename .gsp precompile artifact to .shaderc
GuoLei1990 a34ebcf
refactor(shader-compiler): make standalone with math as sole runtime dep
GuoLei1990 80077fc
refactor(shader-compiler): tighten b:compiler resolve to debug-only a…
GuoLei1990 e639e5a
refactor(core): move flavor bootstrap (ShaderPool / Polyfill / System…
GuoLei1990 ee1d9f3
test: import WebGLEngine from the umbrella package, matching real use…
GuoLei1990 8f55285
test(e2e): allow 4-pixel LSB tolerance for animator-reuse
GuoLei1990 1e1b99c
refactor(core): hide RenderState classes from public exports
GuoLei1990 3251b0c
test(state): import state classes via @galacean/engine-core/src after…
GuoLei1990 5799bd5
fix(build): chain precompile before watch/dev
zhuxudong ced0005
fix(shader-compiler): scope repeat-include warn
zhuxudong a1e0f5d
fix(shader): declare queue var in pipeline passes
zhuxudong 04e0509
fix(shader-compiler): skip block-comment include
zhuxudong c10d7d7
fix(loader): remove material.renderState parsing
zhuxudong f7f2887
fix(shader-compiler): clear chunk cache on watch include edits
zhuxudong 7597b17
refactor(shader-compiler): scope chunk cache to ShaderCompiler instance
GuoLei1990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| { | ||
| "shaderlab-01-basic-shader": "Basic Shader Syntax", | ||
| "shaderlab-02-render-state": "Render State Control", | ||
| "shaderlab-03-ui-script": "UIScript System", | ||
| "shaderlab-04-multi-pass": "Multi-Pass Rendering", | ||
| "shaderlab-05-advance": "Advanced Features & Code Reuse" | ||
| "shader-01-basic-shader": "Basic Shader Syntax", | ||
| "shader-02-render-state": "Render State Control", | ||
| "shader-03-ui-script": "UIScript System", | ||
| "shader-04-multi-pass": "Multi-Pass Rendering", | ||
| "shader-05-advance": "Advanced Features & Code Reuse" | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Split the heading onto its own line to avoid broken Markdown rendering.
At Line 9,
### Problems Solvedis appended to paragraph text, so it won’t reliably render as a heading. Put it on a separate line.✏️ Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[style] ~9-~9: Opting for a less wordy alternative here may improve the clarity of your writing.
Context: ... traditional GLSL/HLSL, Galacean Shader not only includes shader code but also encompasses complete information such as material p...
(NOT_ONLY_ALSO)
🤖 Prompt for AI Agents