Changeset 1480 for GTP/trunk/App/Demos/Illum/PathMap/pathMap.fx
- Timestamp:
- 09/22/06 20:58:26 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/PathMap/pathMap.fx
r896 r1480 43 43 44 44 float4 weightsa[8]; 45 int4 indicesa[8];46 45 47 46 struct vsInputWalk … … 71 70 output.occProjPos = mul(output.worldPos, occWorldToProjMatrix); 72 71 73 output.normal = mul( float4(input.normal.xyz, 0.0), inverseTransposedModelToWorldMatrix);72 output.normal = mul(inverseTransposedModelToWorldMatrix, float4(input.normal.xyz, 0.0)); 74 73 output.tex = input.tex; 75 74 … … 84 83 85 84 float3 col = 0; 86 for(int iCluster=0; iCluster< 8; iCluster++)85 for(int iCluster=0; iCluster<32; iCluster++) 87 86 { 88 int4 index = indicesa[iCluster]; 89 float4 weight = weightsa[iCluster]; 87 float4 weight = weightsa[iCluster/4]; 90 88 float3 val = tex2D(filteredAtlasSampler, float2( 91 input.tex.x / 32.0 + 1.0 / 32.0 * (i ndex.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)); 92 90 col += val.xyz * weight.x; 91 iCluster++; 92 93 93 val = tex2D(filteredAtlasSampler, float2( 94 input.tex.x / 32.0 + 1.0 / 32.0 * (i ndex.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)); 95 95 col += val.xyz * weight.y; 96 iCluster++; 97 96 98 val = tex2D(filteredAtlasSampler, float2( 97 input.tex.x / 32.0 + 1.0 / 32.0 * (i ndex.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)); 98 100 col += val.xyz * weight.z; 101 iCluster++; 102 99 103 val = tex2D(filteredAtlasSampler, float2( 100 input.tex.x / 32.0 + 1.0 / 32.0 * (i ndex.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)); 101 105 col += val.xyz * weight.w; 102 106 } 103 107 // col *= 1000.01; 104 // col *= 0. 0001;108 // col *= 0.8; 105 109 // col = 0; 106 110 … … 133 137 #include "depthMap.fx" 134 138 #include "dots.fx" 139 #include "torch.tx"
Note: See TracChangeset
for help on using the changeset viewer.