diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-22 18:51:37 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-22 18:51:37 +0000 |
| commit | 45e554b7e85555bfa6518eb92ef6a2c0afb9083f (patch) | |
| tree | e8598212ded6bde31b1ab870404faf2828708112 /Tests/TestApp/assets/Shaders/TextureIntTestGL.psh | |
| parent | Updated core and readme with Vulkan configuration instructions on Mac (diff) | |
| download | DiligentEngine-45e554b7e85555bfa6518eb92ef6a2c0afb9083f.tar.gz DiligentEngine-45e554b7e85555bfa6518eb92ef6a2c0afb9083f.zip | |
Updated core + fixed sampler type mismatch issue in texturing tests
Diffstat (limited to 'Tests/TestApp/assets/Shaders/TextureIntTestGL.psh')
| -rw-r--r-- | Tests/TestApp/assets/Shaders/TextureIntTestGL.psh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Tests/TestApp/assets/Shaders/TextureIntTestGL.psh b/Tests/TestApp/assets/Shaders/TextureIntTestGL.psh index 003426d..23c3532 100644 --- a/Tests/TestApp/assets/Shaders/TextureIntTestGL.psh +++ b/Tests/TestApp/assets/Shaders/TextureIntTestGL.psh @@ -1,7 +1,7 @@ // Fragment Shader – file "minimal.frag" layout(location = 1)in vec2 in_UV; -uniform isampler2D g_tex2DTest; +uniform SAMPLER_TYPE g_tex2DTest; layout(location = 0) out vec4 out_Color; @@ -9,25 +9,25 @@ void main(void) { vec2 TexSize; - TexSize = vec2( textureSize(g_tex2DTest, 0) ); - ivec4 texel0 = texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 0); + TexSize = vec2(textureSize(g_tex2DTest, 0)); + vec4 texel0 = vec4(texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 0)); - TexSize = vec2( textureSize(g_tex2DTest, 2) ); - ivec4 texel1 = texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 2); + TexSize = vec2(textureSize(g_tex2DTest, 2)); + vec4 texel1 = vec4(texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 2)); - TexSize = vec2( textureSize(g_tex2DTest, 4) ); - ivec4 texel2 = texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 4); + TexSize = vec2(textureSize(g_tex2DTest, 4)); + vec4 texel2 = vec4(texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 4)); - TexSize = vec2( textureSize(g_tex2DTest, 5) ); - ivec4 texel3 = texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 5); + TexSize = vec2(textureSize(g_tex2DTest, 5)); + vec4 texel3 = vec4(texelFetch(g_tex2DTest, ivec2(in_UV*TexSize), 5)); if( in_UV.x < 0.5 && in_UV.y < 0.5 ) - out_Color = vec4(texel0) / 127.f; + out_Color = texel0 / 127.f; else if( in_UV.x > 0.5 && in_UV.y < 0.5 ) - out_Color = vec4(texel1) / 127.f; + out_Color = texel1 / 127.f; else if( in_UV.x < 0.5 && in_UV.y > 0.5 ) - out_Color = vec4(texel2) / 127.f; + out_Color = texel2 / 127.f; else - out_Color = vec4(texel3) / 127.f; + out_Color = texel3 / 127.f; } |
