git-svn-id: svn://db.shs.com.ru/libs@69 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
#version 150
|
||||
|
||||
uniform sampler2D t0, ts;
|
||||
uniform sampler2D t0, tg1, ts;
|
||||
|
||||
void main(void) {
|
||||
ivec2 tc = ivec2(gl_FragCoord.xy);
|
||||
vec4 v0 = texelFetch(t0, tc, 0), vs = texelFetch(ts, tc, 0);
|
||||
vec4 v0 = texelFetch(t0, tc, 0), vg1 = texelFetch(tg1, tc, 0), vs = texelFetch(ts, tc, 0);
|
||||
float rad;
|
||||
float coeff = modf(v0.a, rad);
|
||||
qgl_FragData[0].rgb = mix(vs.rgb, v0.rgb, coeff);
|
||||
//qgl_FragData[0].rgb = vec3(v0.rgb);
|
||||
float coeff = clamp(modf(v0.a, 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user