Fix Shadow Texture Border Sampling on Web
Fix Shadow Texture Border Sampling on Web, by doing a manual check of the uvs in the shader. This probably slows down other versions, but it is not feasible to have two versions of the shader just for this reason.main
parent
f58d50f7ab
commit
fab5c86841
@ -0,0 +1,5 @@
|
||||
@block clamp_to_border
|
||||
//WebGL does not support GL_CLAMP_TO_BORDER, or border colors at all it seems, so we have to check explicitly.
|
||||
if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)
|
||||
return 1.0;
|
||||
@end
|
Loading…
Reference in New Issue