Ignore:
Timestamp:
09/22/06 20:58:26 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/PathMap/pathMap.fx

    r896 r1480  
    4343 
    4444float4          weightsa[8]; 
    45 int4            indicesa[8]; 
    4645 
    4746struct vsInputWalk 
     
    7170        output.occProjPos = mul(output.worldPos, occWorldToProjMatrix);  
    7271         
    73         output.normal = mul(float4(input.normal.xyz, 0.0), inverseTransposedModelToWorldMatrix); 
     72        output.normal = mul(inverseTransposedModelToWorldMatrix, float4(input.normal.xyz, 0.0)); 
    7473        output.tex = input.tex; 
    7574         
     
    8483         
    8584        float3 col = 0; 
    86         for(int iCluster=0; iCluster<8; iCluster++) 
     85        for(int iCluster=0; iCluster<32; iCluster++) 
    8786        { 
    88                 int4 index = indicesa[iCluster]; 
    89                 float4 weight = weightsa[iCluster]; 
     87                float4 weight = weightsa[iCluster/4]; 
    9088                float3 val = tex2D(filteredAtlasSampler, float2( 
    91                         input.tex.x / 32.0 + 1.0 / 32.0 * (index.x % 32) + 0.0 / 4096.0, 1.0 - input.tex.y + 0.0 / 128.0)); 
     89                        input.tex.x / 32.0 + 1.0 / 32.0 * (iCluster % 32) + 0.0 / 4096.0, 1.0 - input.tex.y + 0.0 / 128.0)); 
    9290                col += val.xyz * weight.x; 
     91                iCluster++; 
     92                 
    9393                val = tex2D(filteredAtlasSampler, float2( 
    94                         input.tex.x / 32.0 + 1.0 / 32.0 * (index.y % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
     94                        input.tex.x / 32.0 + 1.0 / 32.0 * (iCluster % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
    9595                col += val.xyz * weight.y; 
     96                iCluster++; 
     97                 
    9698                val = tex2D(filteredAtlasSampler, float2( 
    97                         input.tex.x / 32.0 + 1.0 / 32.0 * (index.z % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
     99                        input.tex.x / 32.0 + 1.0 / 32.0 * (iCluster % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
    98100                col += val.xyz * weight.z; 
     101                iCluster++; 
     102                 
    99103                val = tex2D(filteredAtlasSampler, float2( 
    100                         input.tex.x / 32.0 + 1.0 / 32.0 * (index.w % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
     104                        input.tex.x / 32.0 + 1.0 / 32.0 * (iCluster % 32) + 0.0 / 4096.0, 1.0 - input.tex.y  + 0.0 / 128.0)); 
    101105                col += val.xyz * weight.w; 
    102106        } 
    103107//      col *= 1000.01;  
    104 //      col *= 0.0001; 
     108//      col *= 0.8; 
    105109//      col = 0; 
    106110 
     
    133137#include "depthMap.fx" 
    134138#include "dots.fx" 
     139#include "torch.tx" 
Note: See TracChangeset for help on using the changeset viewer.