aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorhwc4872012-06-28 11:44:15 -0700
committerhwc4872012-06-28 11:44:15 -0700
commit22cbc9644b79df60b3f6336f9563debd47fb3ea1 (patch)
treef32687a920a039e0f048fab74627e0dc4ad6a8f1 /assets
parent2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff)
downloadninja-22cbc9644b79df60b3f6336f9563debd47fb3ea1.tar.gz
Added capability to split a mesh into multiiple parts to avoid buffer overflow situations.
Diffstat (limited to 'assets')
-rw-r--r--assets/shaders/Flag.vert.glsl3
-rw-r--r--assets/shaders/Pulse.frag.glsl1
-rwxr-xr-xassets/shaders/test_fshader_full.glsl2
3 files changed, 4 insertions, 2 deletions
diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl
index 1c842cb0..8ba00922 100644
--- a/assets/shaders/Flag.vert.glsl
+++ b/assets/shaders/Flag.vert.glsl
@@ -35,7 +35,8 @@ void main()
35 const float pi = 3.14159; 35 const float pi = 3.14159;
36 float angle = time; 36 float angle = time;
37 37
38 v_uv = texcoord; 38 v_uv.x = texcoord.x;
39 v_uv.y = texcoord.y;
39 40
40 float x = 2.0*pi*texcoord.x/u_waveWidth; 41 float x = 2.0*pi*texcoord.x/u_waveWidth;
41 float y = 2.0*pi*texcoord.y; 42 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 ef721b39..0ea3cf1b 100755
--- a/assets/shaders/test_fshader_full.glsl
+++ b/assets/shaders/test_fshader_full.glsl
@@ -38,7 +38,7 @@ varying vec3 vEyePos;
38 38
39void main() 39void main()
40{ 40{
41 vec4 colMapTexel = vec4(texture2D(colMap, vec2(vNormal.w, vECPos.w)).rgb, 1.0); 41 vec4 colMapTexel = vec4(texture2D(colMap, vec2(vNormal.w, 1.0 - vECPos.w)).rgb, 1.0);
42 42
43 // normal mapping 43 // normal mapping
44 vec3 normal = normalize(vNormal.xyz); 44 vec3 normal = normalize(vNormal.xyz);