shadows: fix on transformed

This commit is contained in:
Vaxry
2023-11-04 19:32:50 +00:00
parent 7a09d24065
commit 64a084477e
4 changed files with 101 additions and 32 deletions

View File

@@ -130,6 +130,16 @@ void main() {
gl_FragColor = texture2D(tex, v_texcoord);
})#";
inline const std::string TEXFRAGSRCRGBAMATTE = R"#(
precision mediump float;
varying vec2 v_texcoord; // is in 0-1
uniform sampler2D tex;
uniform sampler2D texMatte;
void main() {
gl_FragColor = texture2D(tex, v_texcoord) * (1.0 - texture2D(texMatte, v_texcoord)[3]);
})#";
inline const std::string TEXFRAGSRCRGBX = R"#(
precision mediump float;
varying vec2 v_texcoord;