Closed eyworldwide closed 6 months ago
current compile workflow:
will case some problom:
maybe the final solution?
@zhuxudong @Sway007 I think WebGPU should also be taken into consideration. This is the way to ensure that our architecture is future-proof.
flowchart LR
shaderLab --> AST{AST Compile};
AST --WebGL2--> GLSL300;
AST --WebGL1--> GLSL100;
AST --WebGPU--> WGSL;
@zhuxudong For now, you just need to apply a quick patch.
@zhuxudong @Sway007 I think WebGPU should also be taken into consideration. This is the way to ensure that our architecture is future-proof.
flowchart LR shaderLab --> AST{AST Compile}; AST --WebGL2--> GLSL300; AST --WebGL1--> GLSL100; AST --WebGPU--> WGSL;
@zhuxudong For now, you just need to apply a quick patch.
yes,the source of the AST is not only the shaderLab, such as you original glsl100
or glsl300
or wgsl
, I don't know if we should consider this
yes,the source of the AST is not only the shaderLab, such as you original
glsl100
orglsl300
orwgsl
, I don't know if we should consider this
I think choosing to establish a standard language is a better option. It makes no sense to support such a wide array of syntaxes. These languages should serve as compiled outputs, rather than inputs.
Describe the bug I think it's a glsl code compile bug. Support for GLSL ES 3.00 is not very good.
To Reproduce
The source code of frag shader:
The ShaderFactory.convertTo300 method converts the code to:
Screenshots
Expected behavior
Perhaps giving the user the option to choose would be a wise decision.