547c29f7bb
I kept the code to replace constant zero arguments, because `Bias` and `Grad` still have some problems on desktop GPUs. `Bias` works on AMD GPUs. `Grad` does not. Both work on Intel. Still needs testing on NV. It will definitely work with Apple GPUs.
12 lines
375 B
GLSL
12 lines
375 B
GLSL
#version 450
|
|
|
|
layout(binding = 0) uniform texture2DArray uTex;
|
|
layout(binding = 1) uniform samplerShadow uShadow;
|
|
layout(location = 0) in vec4 vUV;
|
|
layout(location = 0) out float FragColor;
|
|
|
|
void main()
|
|
{
|
|
FragColor = textureGrad(sampler2DArrayShadow(uTex, uShadow), vUV, vec2(0.0), vec2(0.0)) + textureGrad(sampler2DArrayShadow(uTex, uShadow), vUV, vec2(1.0), vec2(1.0));
|
|
}
|