Open erikdubbelboer opened 10 months ago
PlayCanvas is currently using glslang and twgsl to transpile GLSL into WGSL. This doesn't support all new features in WGSL which are not usable now.
Things like
@group(0) @binding(0) var externalTexture : texture_external;
@builtin(instance_index) instanceIdx : u32
The shader generator will need to be changed and all current shaders will need to be rewritten. It will need to be possible for developers to provide shader chunks for both GLSL and WGSL at the same time for backwards compatibility.
related: https://github.com/playcanvas/engine/issues/5691
PlayCanvas is currently using glslang and twgsl to transpile GLSL into WGSL. This doesn't support all new features in WGSL which are not usable now.
Things like
@group(0) @binding(0) var externalTexture : texture_external;
for fast video texture support.@builtin(instance_index) instanceIdx : u32
for hardware instancing.The shader generator will need to be changed and all current shaders will need to be rewritten. It will need to be possible for developers to provide shader chunks for both GLSL and WGSL at the same time for backwards compatibility.