- Timestamp:
- 07/02/07 04:04:08 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPCaustic/GTPCaustic.hlsl
r2368 r2471 62 62 63 63 float3 R = refract(V, wNormal, refIndex); 64 64 if(dot(R,R) == 0) 65 R = reflect(V, wNormal); 66 65 67 dir = R; 66 68 dir = Hit(cubeMapPos, R, DistanceMap); … … 140 142 IN.color = CausticColor; 141 143 float intens = tex2D(intensityTex, IN.texCoord).r; 142 IN.color.a *= intens; 144 //IN.color.a *= intens; 145 IN.color *= IN.color.a * intens; 146 IN.color.a = IN.dist; 143 147 return IN.color; 144 148 } … … 149 153 { 150 154 float4 hPosition : POSITION; 151 float4 color : COLOR0; 155 float4 color : COLOR0; 156 float dist : TEXCOORD0; 152 157 }; 153 158 … … 231 236 OUT.color = float4(1,1,1,1); 232 237 } 233 238 239 OUT.dist = length(pos.xyz); 234 240 return OUT; 235 241 } … … 238 244 uniform float4 CausticColor ):COLOR 239 245 { 240 return IN.color * CausticColor; 246 247 return float4(IN.color.rgb * CausticColor.rgb * IN.color.a, IN.dist); 241 248 } 242 249
Note: See TracChangeset
for help on using the changeset viewer.