Changeset 1837


Ignore:
Timestamp:
12/01/06 12:21:04 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r1424 r1837  
    113113        //texCoord.z = normalize(texCoord.z); 
    114114        //texCoord.w = normalize(texCoord.w); 
    115     float2 offset = texCoord.zw * baseRadius; 
     115    float2 offset = texCoord.zw * 100+ baseRadius * 0.000000000001; 
    116116        OUT.r = abs(offset.x); 
    117117        float4 cPosition;    
     
    125125    OUT.hPosition = mul( Proj, cPosition ); 
    126126    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;    
    128130    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          
    133132    OUT.texCoord = texCoord.xy;   
    134133    OUT.Color = Color; 
     
    258257         
    259258        Color = float4(1, 1, 1, alpha) * IN.Color; 
    260         return Color;  
     259      return Color;  
    261260         
    262261} 
Note: See TracChangeset for help on using the changeset viewer.