diff options
Diffstat (limited to 'assets/shaders')
-rw-r--r-- | assets/shaders/Flag.vert.glsl | 3 | ||||
-rw-r--r-- | assets/shaders/Pulse.frag.glsl | 1 | ||||
-rwxr-xr-x | assets/shaders/test_fshader_full.glsl | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl index 51ec8f8b..6e2854ee 100644 --- a/assets/shaders/Flag.vert.glsl +++ b/assets/shaders/Flag.vert.glsl | |||
@@ -59,7 +59,8 @@ void main() | |||
59 | const float pi = 3.14159; | 59 | const float pi = 3.14159; |
60 | float angle = time; | 60 | float angle = time; |
61 | 61 | ||
62 | v_uv = texcoord; | 62 | v_uv.x = texcoord.x; |
63 | v_uv.y = texcoord.y; | ||
63 | 64 | ||
64 | float x = 2.0*pi*texcoord.x/u_waveWidth; | 65 | float x = 2.0*pi*texcoord.x/u_waveWidth; |
65 | float y = 2.0*pi*texcoord.y; | 66 | float y = 2.0*pi*texcoord.y; |
diff --git a/assets/shaders/Pulse.frag.glsl b/assets/shaders/Pulse.frag.glsl index 9aeb05c9..b717d359 100644 --- a/assets/shaders/Pulse.frag.glsl +++ b/assets/shaders/Pulse.frag.glsl | |||
@@ -22,6 +22,7 @@ void main(void) | |||
22 | float cLength = length(cPos); | 22 | float cLength = length(cPos); |
23 | 23 | ||
24 | vec2 uv = gl_FragCoord.xy/u_resolution.xy+(cPos/cLength)*sin(cLength/30.0-time*10.0)/25.0; | 24 | vec2 uv = gl_FragCoord.xy/u_resolution.xy+(cPos/cLength)*sin(cLength/30.0-time*10.0)/25.0; |
25 | uv.y = 1.0 - uv.y; | ||
25 | vec3 col = texture2D(u_tex0,uv).xyz*50.0/cLength; | 26 | vec3 col = texture2D(u_tex0,uv).xyz*50.0/cLength; |
26 | 27 | ||
27 | gl_FragColor = vec4(col,1.0); | 28 | gl_FragColor = vec4(col,1.0); |
diff --git a/assets/shaders/test_fshader_full.glsl b/assets/shaders/test_fshader_full.glsl index c381c6bf..b2fc60e9 100755 --- a/assets/shaders/test_fshader_full.glsl +++ b/assets/shaders/test_fshader_full.glsl | |||
@@ -62,7 +62,7 @@ varying vec3 vEyePos; | |||
62 | 62 | ||
63 | void main() | 63 | void main() |
64 | { | 64 | { |
65 | vec4 colMapTexel = vec4(texture2D(colMap, vec2(vNormal.w, vECPos.w)).rgb, 1.0); | 65 | vec4 colMapTexel = vec4(texture2D(colMap, vec2(vNormal.w, 1.0 - vECPos.w)).rgb, 1.0); |
66 | 66 | ||
67 | // normal mapping | 67 | // normal mapping |
68 | vec3 normal = normalize(vNormal.xyz); | 68 | vec3 normal = normalize(vNormal.xyz); |