From a4e5fb47375488cb4d05b1753eba9044eb0336e9 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 18 Feb 2018 11:38:23 -0800 Subject: Fixed some GLES shader issues --- .../assets/Shaders/CSTest/FillTextureGL.csh | 2 +- .../assets/Shaders/CSTest/UpdateVertBuffGLES.csh | 26 +++++++++------------- 2 files changed, 12 insertions(+), 16 deletions(-) (limited to 'Tests/TestApp') diff --git a/Tests/TestApp/assets/Shaders/CSTest/FillTextureGL.csh b/Tests/TestApp/assets/Shaders/CSTest/FillTextureGL.csh index c2d8298..074671d 100644 --- a/Tests/TestApp/assets/Shaders/CSTest/FillTextureGL.csh +++ b/Tests/TestApp/assets/Shaders/CSTest/FillTextureGL.csh @@ -1,5 +1,5 @@ -layout(rgba8, binding = 2) uniform image2D g_tex2DTestUAV; +layout(rgba8, binding = 2) uniform writeonly image2D g_tex2DTestUAV; layout (local_size_x = 16, local_size_y = 16, local_size_z = 1) in; diff --git a/Tests/TestApp/assets/Shaders/CSTest/UpdateVertBuffGLES.csh b/Tests/TestApp/assets/Shaders/CSTest/UpdateVertBuffGLES.csh index 4f34c95..0461492 100644 --- a/Tests/TestApp/assets/Shaders/CSTest/UpdateVertBuffGLES.csh +++ b/Tests/TestApp/assets/Shaders/CSTest/UpdateVertBuffGLES.csh @@ -4,7 +4,7 @@ // If you do not want your data to be aligned by compiler try to use: // packed or shared instead of std140 keyword. // We also bind the buffer to index 0. You need to set the buffer binding -// in the range [0..3] – this is the minimum range approved by Khronos. +// in the range [0..3] � this is the minimum range approved by Khronos. // Notice that various platforms might support more indices than that. layout(std140, binding = 2) buffer bufPositions { @@ -24,24 +24,20 @@ void main() { int Ind = int(gl_GlobalInvocationID.x); - vec2 pos[4] = - { - vec2(0.0, 0.0), - vec2(0.0, 1.0), - vec2(1.0, 0.0), - vec2(1.0, 1.0) - }; + vec2 pos[4]; + pos[0] = vec2(0.0, 0.0); + pos[1] = vec2(0.0, 1.0); + pos[2] = vec2(1.0, 0.0); + pos[3] = vec2(1.0, 1.0); vec2 CurrPos = pos[Ind]; CurrPos = CurrPos*vec2(0.3, 0.3) + vec2(0.0, -1.0); - vec2 uv[4] = - { - vec2(0.0, 1.0), - vec2(0.0, 0.0), - vec2(1.0, 1.0), - vec2(1.0, 0.0) - }; + vec2 uv[4]; + uv[0] = vec2(0.0, 1.0); + uv[1] = vec2(0.0, 0.0); + uv[2] = vec2(1.0, 1.0); + uv[3] = vec2(1.0, 0.0); g_Positions.data[Ind] = vec4(CurrPos.xy, 0.0, 0.0); g_Texcoords.data[Ind] = vec4(uv[Ind], 0.0, 0.0); -- cgit v1.2.3