Ignore:
Timestamp:
06/05/07 01:55:55 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPathMap/PathMap.hlsl

    r2345 r2403  
    2828        output.pos = mul(WorldViewProj, input.pos); 
    2929        output.tex = input.tex; 
    30         output.texAtlas = input.texAtlas;        
     30        output.texAtlas = input.tex;     
    3131        return output; 
    3232} 
     
    3434float4  psWalk(vsOutputWalk input) : COLOR 
    3535{ 
     36        float2 texAtlas = input.texAtlas; 
     37         
    3638        int2 prmAtlasTiles = prmAtlasTilesHalfPixel.xy; 
    3739        float2 atlasHalfPixel = prmAtlasTilesHalfPixel.zw; 
     
    4143        { 
    4244                float2 prmTexPos = float2( 
    43                         (input.texAtlas.x + (iCluster % prmAtlasTiles.x)) / prmAtlasTiles.x, 
    44                         1.0 - (input.texAtlas.y + (iCluster / prmAtlasTiles.x)) / prmAtlasTiles.y);// + atlasHalfPixel; 
     45                        (texAtlas.x + (iCluster % prmAtlasTiles.x)) / prmAtlasTiles.x, 
     46                        1.0 - (texAtlas.y + (iCluster / prmAtlasTiles.x)) / prmAtlasTiles.y);// + atlasHalfPixel; 
    4547 
    4648                float weightIndex = tex2D(clusterWeightIndexSampler, float2(((float)iCluster + 0.5) / clusterCount, 0.5)).r; 
    4749                float3 weight = tex2D(clusterWeightSampler, float2((weightIndex + 0.5)/allClusterCount, 0.5)).rgb; 
    48                 //weight = 0.0002 + 0.000000000001 * weight; 
    4950                float3 val = tex2D(filteredAtlasSampler, prmTexPos).xyz; 
    50                 if(length(val - float3(1,1,1))== 0) 
    51                 val = 0; 
    52                 col += val.xyz * weight;                 
     51                //if(length(val - float3(1,1,1))== 0) 
     52                //val = 0; 
     53                col += val.xyz * weight;         
     54                //col = 0.00000000001 * col + float3(prmTexPos,1); 
    5355        } 
    5456         
     
    5658 
    5759//return float4(col,1); 
    58         return float4(col * color, 1); 
     60//return float4(color + 0.0000000001 * col, 1)  ; 
     61return float4(col * color, 1); 
    5962 
    6063 
    61         //return float4(col,1) * 0.0000000000001 + tex2D(filteredAtlasSampler, float2(input.texAtlas.x / 32.0, input.texAtlas.y)); 
     64//return float4(col,1) * 0.0000000000001 + tex2D(filteredAtlasSampler, float2(input.texAtlas.x / 32.0, input.texAtlas.y)); 
    6265} 
    6366 
Note: See TracChangeset for help on using the changeset viewer.