git-svn-id: svn://db.shs.com.ru/libs@75 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2016-01-18 14:41:29 +00:00
parent 5b523a65ae
commit d88b341070
28 changed files with 539 additions and 112 deletions

View File

@@ -6,10 +6,10 @@ void main(void) {
ivec2 tc = ivec2(gl_FragCoord.xy);
vec4 v0 = texelFetch(t0, tc, 0), vg1 = texelFetch(tg1, tc, 0), vs = texelFetch(ts, tc, 0);
float rad;
float coeff = clamp(modf(v0.a, rad) * 1.1, 0., 1.);
float coeff = clamp(modf(v0.w, rad) * 1.1, 0., 1.);
float reflectivity = 0.;
float specularity = modf(vg1.w, reflectivity);
reflectivity = clamp(reflectivity / 100., 0., 1.);
qgl_FragData[0].rgb = mix(vs.rgb, v0.rgb, coeff * reflectivity);
//qgl_FragData[0].rgb = vec3(vs.rgb*coeff * reflectivity);
//qgl_FragData[0].rgb = vec3(v0.w);
}