Changeset 2327
- Timestamp:
- 04/16/07 18:15:52 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPParticles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPParticles/GTP_HPS.hlsl
r2024 r2327 313 313 314 314 float4 HPS_Large_Depth_Illum_PS(VS_OUT_DEPTH_ILLUM IN, 315 uniform float nearPlane, 315 316 uniform sampler2D Texture : register(s0), 316 317 uniform sampler2D depthTexture : register(s1), … … 337 338 float frontDepth = IN.cPosition.z + size * (f - 0.5); 338 339 float backDepth = IN.cPosition.z + size * (b - 0.5); 339 340 alpha = (sceneDepth - frontDepth) / (backDepth - frontDepth); 340 float B = min(sceneDepth, backDepth); 341 float F = max(frontDepth, nearPlane); 342 float ds = B - F; 343 alpha = ds / (backDepth - frontDepth); 341 344 alpha = saturate(alpha) * impostor.a; 342 345 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPParticles/GTP_Particles.material
r2315 r2327 226 226 fragment_program_ref GTP/HPS/Large_Depth_Illum_PS 227 227 { 228 228 param_named_auto nearPlane near_clip_distance 229 229 } 230 230 //impostor texture
Note: See TracChangeset
for help on using the changeset viewer.