meow-7.2.2
Geenz 2012-06-13 20:49:35 -04:00
commit 0a0d1df6bf
19 changed files with 19 additions and 19 deletions

View File

@ -46,6 +46,6 @@ void main()
frag_data[0] = vec4(diff.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -52,5 +52,5 @@ void main()
frag_data[1] = vertex_color.aaaa; // spec
//frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(tnorm);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -49,6 +49,6 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0); // spec
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -48,5 +48,5 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -49,6 +49,6 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0); // spec
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -42,6 +42,6 @@ void main()
frag_data[1] = vertex_color.aaaa; // spec
//frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -41,5 +41,5 @@ void main()
frag_data[1] = vertex_color.aaaa; // spec
//frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -79,7 +79,7 @@ void main()
}
vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
norm = normalize(norm);
vec4 spec = texture2DRect(specularRect, frag.xy);
vec3 diff = texture2DRect(diffuseRect, frag.xy).rgb;

View File

@ -83,7 +83,7 @@ void main()
}
vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
float da = dot(norm, lv);
if (da < 0.0)
{

View File

@ -277,7 +277,7 @@ void main()
float depth = texture2DRect(depthMap, tc.xy).r;
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);

View File

@ -123,7 +123,7 @@ void main()
vec4 pos = getPosition(pos_screen);
vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
frag_color[0] = 1.0;
frag_color[1] = calcAmbientOcclusion(pos, norm);

View File

@ -56,6 +56,6 @@ void main()
frag_data[0] = vec4(outColor.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -48,5 +48,5 @@ void main()
frag_data[0] = vec4(vertex_color.rgb*col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
frag_data[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
frag_data[2] = vec4(nvn.xyz * 0.5 + 0.5, 0.0);
}

View File

@ -161,5 +161,5 @@ void main()
frag_data[0] = vec4(color.rgb, 0.5); // diffuse
frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec
frag_data[2] = vec4(screenspacewavef.xy*0.5+0.5, screenspacewavef.z, screenspacewavef.z*0.5); // normalxyz, displace
frag_data[2] = vec4(screenspacewavef.xyz*0.5+0.5, screenspacewavef.z*0.5); // normalxyz, displace
}

View File

@ -154,7 +154,7 @@ void main()
}
vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
norm = normalize(norm);
float l_dist = -dot(lv, proj_n);

View File

@ -279,7 +279,7 @@ void main()
float depth = texture2DRect(depthMap, tc.xy).r;
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);

View File

@ -106,7 +106,7 @@ void main()
}
vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = (norm.xyz-0.5)*2.0; // unpack norm
norm = normalize(norm);
float l_dist = -dot(lv, proj_n);

View File

@ -125,7 +125,7 @@ void main()
vec4 pos = getPosition(pos_screen);
vec4 nmap4 = texture2DRect(normalMap, pos_screen);
nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
nmap4 = vec4((nmap4.xyz-0.5)*2.0,nmap4.w); // unpack norm
float displace = nmap4.w;
vec3 norm = nmap4.xyz;

View File

@ -186,7 +186,7 @@ void main()
vec4 pos = getPosition(pos_screen);
vec4 nmap4 = texture2DRect(normalMap, pos_screen);
nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
nmap4 = vec4((nmap4.xyz-0.5)*2.0,nmap4.w); // unpack norm
float displace = nmap4.w;
vec3 norm = nmap4.xyz;