Ignore:
Timestamp:
07/06/06 10:03:46 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Caustic.hlsl

    r807 r1085  
    3030                                uniform samplerCUBE CubeMap : register(s0), 
    3131                                uniform samplerCUBE distanceCube : register(s1), 
    32                                 uniform float3 cubeMapCameraPosition):COLOR 
     32                                uniform float3 cubeMapCameraPosition, 
     33                                uniform float attenuation):COLOR 
    3334{ 
    3435        float4 Color = float4(1,1,1,1);  
     
    3940        float dist = readDistanceCubeMap(distanceCube, dir); 
    4041         
    41         float EPSILON = 20.0; 
     42        float EPSILON = 0.1; 
    4243 
    43         if(mydist > dist + EPSILON) caustic = 0; 
    44                          
     44        //if(mydist > dist + EPSILON) caustic = 0; 
     45         caustic *= max(attenuation - mydist, 0) / attenuation; 
     46                 
    4547        Color = caustic; 
    4648                 
Note: See TracChangeset for help on using the changeset viewer.