Open ragarg opened 6 months ago
When working with glslang and webgpu I had a problem when working with depth textures. On webgl used sampler2D, but for webgpu need to use the texture_deptkh_2d format.
For color textures I change the line: uniform sampler2D texture ;
uniform sampler2D texture ;
into these lines:
layout(set = 0, binding = 0) uniform sampler sampler ; layout(set = 0, binding = 1) uniform texture2D texture2d ; #define texture samplerCube(texture2d, sampler )
I tried using sampler2DShadow and it didn't do anything
Is there some way in glslang that the texture is used as a depth texture?
When working with glslang and webgpu I had a problem when working with depth textures. On webgl used sampler2D, but for webgpu need to use the texture_deptkh_2d format.
For color textures I change the line:
uniform sampler2D texture ;
into these lines:
I tried using sampler2DShadow and it didn't do anything
Is there some way in glslang that the texture is used as a depth texture?