-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add shader lab package and support shader framework #1610
Conversation
|
||
export const Enabled = createKeywordToken("Enabled"); | ||
export const SrcColorBlendFactor = createKeywordToken("SrcColorBlendFactor"); | ||
export const DestColorBlendFactor = createKeywordToken("DestColorBlendFactor"); |
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.
Where to consume these variables,RenderState
is in Material
instead of Shader
now
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.
Where to consume these variables,
RenderState
is inMaterial
instead ofShader
now
- The keywords mentioned above is for shader DSL parser only, and invisible to engine user
- yes, the renderstate keywords should be present in
subshader
orpass
block
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.
All shader grammer rules is declared in src/parser/rules
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.
yes,so you should put these variables from Material to Shader to enable these function
// built-in variable | ||
export const GLPosition = createKeywordToken("gl_Position"); | ||
export const GLFragColor = createKeywordToken("gl_FragColor"); | ||
|
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.
miss gl_FragCoord, gl_FragDepth, gl_FragData
and so on,may be you can refer to this document:https://registry.khronos.org/OpenGL/specs/es/3.0/GLSL_ES_Specification_3.00.pdf
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.
miss
gl_FragCoord, gl_FragDepth, gl_FragData
and so on,may be you can refer to this document:https://registry.khronos.org/OpenGL/specs/es/3.0/GLSL_ES_Specification_3.00.pdf
Complementation of all glsl keywords is not the key aim of this pull request, plan to do it in next iteration.
…o dev/shaderLab
* dev/1.1: Support ktx2 loader (galacean#1625) feat: add texture plugin to support ktx loader (galacean#1640) Fix blend shape bug due to buffer index errors (galacean#1632) Model Mesh supports two-way data synchronization (galacean#1588)
…o dev/shaderLab
…aderlab * 'dev/shaderLab' of github.com:Sway007/engine: fix: rename shader-lab package name
…o dev/shaderLab
* dev/1.1: (48 commits) fix: skin mesh error (galacean#1675) fix: test error (galacean#1674) test: fix github test (galacean#1669) test: fix ci not work (galacean#1670) glTF support basisu (galacean#1662) fix: `EventDispatcher` static pool bug fix: eventdispatcher bug (galacean#1671) fix: animation event bug (galacean#1666) Shader pass support blend (galacean#1668) Fix model mesh advanced data write bug (galacean#1663) Cherry pick glTF conflict (galacean#1660) Fix worker status set error and can't throw error bug (galacean#1652) Fix parse glTF texture wrap & filterMode bug (galacean#1659) Add shader lab package and support shader framework (galacean#1610) Fix text wrap bug (galacean#1644) chore: use strict error msg and type (galacean#1647) Fix text error for set text to "" and set enableWrapping to true (galacean#1634) "v1.0.0-beta.17" Process GLTFBufferParser and GLTFTextureParser pipelines in parallel (galacean#1638) Fix animation clip loader, clip change promise to assetPromise, controller json parse (galacean#1506) ...
Please check if the PR fulfills these requirements
Featutres:
Example
galacean/galacean.github.io#763