@@ -11,7 +11,7 @@ float4 plight_infinity( float m, float3 pnt, float3 normal, float3 light_directi
11
11
float3 V = - normalize (pnt ); // vector2eye
12
12
float3 L = - light_direction ; // vector2light
13
13
float3 H = normalize (L + V ); // float-angle-vector
14
- return tex3D (s_material , float3 ( dot (L ,N ), dot (H ,N ), m ) ); // sample material
14
+ return tex3D (s_material , float3 ( dot (L ,N ), dot (H ,N ), m ) ). xxxy ; // sample material
15
15
}
16
16
/*
17
17
float plight_infinity2( float m, float3 pnt, float3 normal, float3 light_direction )
@@ -25,7 +25,7 @@ float plight_infinity2( float m, float3 pnt, float3 normal, float3 light_directi
25
25
s = saturate(dot(H,N));
26
26
float f = saturate(dot(-V,R));
27
27
s *= f;
28
- float4 r = tex3D (s_material, float3( dot(L,N), s, m ) ); // sample material
28
+ float4 r = tex3D (s_material, float3( dot(L,N), s, m ) ).xxxy ; // sample material
29
29
r.w = pow(saturate(s),4);
30
30
return r ;
31
31
}
@@ -40,7 +40,7 @@ float4 plight_local( float m, float3 pnt, float3 normal, float3 light_position,
40
40
float3 H = normalize (L + V ); // float-angle-vector
41
41
rsqr = dot (L2P ,L2P ); // distance 2 light (squared)
42
42
float att = saturate (1 - rsqr * light_range_rsq ); // q-linear attenuate
43
- float4 light = tex3D (s_material , float3 ( dot (L ,N ), dot (H ,N ), m ) ); // sample material
43
+ float4 light = tex3D (s_material , float3 ( dot (L ,N ), dot (H ,N ), m ) ). xxxy ; // sample material
44
44
return att * light ;
45
45
}
46
46
0 commit comments