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

This commit is contained in:
2019-12-10 18:01:17 +00:00
parent ff4f9a3b2b
commit 16146ae6fd
4 changed files with 20 additions and 14 deletions

View File

@@ -109,10 +109,11 @@ void main(void) {
vec3 normal = v1.xyz;
vec3 specular = v2.rgb;
vec3 emission = v3.rgb;
float reflectivity = v0.w;
float height = v2.w;
float reflectivity = v2.w;
//float height = v2.w;
float roughness = v3.w;
//bn = normalize(vec3(v3.w, v4.zw));
float alpha = v0.a;
//bn = normalize(vec3(v3.w, v4.zw));
//bn2 = normalize(cross(n, bn));
shm_diff = max(roughness, 0.00001);
@@ -124,6 +125,6 @@ void main(void) {
for (int i = 0; i < lights_count; ++i)
calcLight(lights_start + i, normal, v);
qgl_FragColor = vec4(max(vec3(0), li * diffuse + si * specular + emission), 1);
//qgl_FragColor.rgb = vec3(pos.xyz/100);
qgl_FragColor = vec4(max(vec3(0), li * diffuse + si * specular + emission), alpha);
//qgl_FragColor. = vec3(alpha);
}