diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-04 19:32:50 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-04 19:32:50 +0000 |
| commit | 64a084477ea8df67cbb35b22826a1f6a0845e123 (patch) | |
| tree | df8e620d6a3936e4d196c51e4129cb61107c5642 /src/render/shaders | |
| parent | 7a09d24065050ad5b9490a6be947229ae83cb824 (diff) | |
shadows: fix on transformed
Diffstat (limited to 'src/render/shaders')
| -rw-r--r-- | src/render/shaders/Textures.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index 6f19ac9f..cf753bb4 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -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; |
