Changeset 1837 for GTP/trunk/App/Demos/Illum
- Timestamp:
- 12/01/06 12:21:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_HPS_Smoke_L_Depth.hlsl
r1424 r1837 113 113 //texCoord.z = normalize(texCoord.z); 114 114 //texCoord.w = normalize(texCoord.w); 115 float2 offset = texCoord.zw * baseRadius;115 float2 offset = texCoord.zw * 100+ baseRadius * 0.000000000001; 116 116 OUT.r = abs(offset.x); 117 117 float4 cPosition; … … 125 125 OUT.hPosition = mul( Proj, cPosition ); 126 126 float4 sPosition = OUT.hPosition / OUT.hPosition.w; 127 OUT.screenCoord = (sPosition.xy + float2(1, 1)) / 2.0; 127 OUT.screenCoord = (sPosition.xy + float2(1.0, 1.0)) / float2(2.0, 2.0); 128 float2 halfpixel = float2(0.5 / width, 0.5 / height); 129 OUT.screenCoord += halfpixel; 128 130 OUT.screenCoord.y = 1.0 - OUT.screenCoord.y; 129 float2 halfpixel = float2(1.0 / width, 1.0 / height); 130 OUT.screenCoord += halfpixel; 131 132 131 133 132 OUT.texCoord = texCoord.xy; 134 133 OUT.Color = Color; … … 258 257 259 258 Color = float4(1, 1, 1, alpha) * IN.Color; 260 259 return Color; 261 260 262 261 }
Note: See TracChangeset
for help on using the changeset viewer.