git-svn-id: svn://db.shs.com.ru/libs@42 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#version 130
|
||||
|
||||
in vec3 src_normal, normal, et;
|
||||
in vec3 src_normal, normal;//, et;
|
||||
in vec4 pos, col;
|
||||
in float fogCoord;
|
||||
|
||||
@@ -19,9 +19,13 @@ void main(void) {
|
||||
if (has_height) hei = dot(texture2D(t2, gl_TexCoord[0].xy).rgb, luma) * height_scale;
|
||||
if (acc_fog) dc.xyz = mix(dc.rgb, gl_Fog.color.rgb, fogCoord);
|
||||
|
||||
vec3 n;
|
||||
if (has_bump) n = normalize(normal - (texture2D(t1, gl_TexCoord[0].xy).rgb - vec3(0.5, 0.5, 1.)) * bump_scale);
|
||||
else n = normalize(normal);
|
||||
vec3 n, dn;
|
||||
if (has_bump) {
|
||||
dn = (texture2D(t1, gl_TexCoord[0].xy).rgb - vec3(0.5, 0.5, 1.)) * bump_scale;
|
||||
dn.x = -dn.x;
|
||||
dn = dn * mat3(gl_ModelViewMatrixInverse);
|
||||
n = normalize(normal - dn);
|
||||
} else n = normalize(normal);
|
||||
|
||||
if (has_diffuse) {
|
||||
|
||||
@@ -30,7 +34,7 @@ void main(void) {
|
||||
dpm = gl_ModelViewProjectionMatrixInverse
|
||||
dpm = dpm * gl_ModelViewProjectionMatrixInverse;
|
||||
dpm += */
|
||||
tc += 1-et.xy * hei/10;// / et.z;
|
||||
//tc += 1+et.xy * hei/10;// / et.z;
|
||||
dc *= texture2D(t0, tc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user