Changeset 2212 for GTP/trunk/App/Demos/Illum/pathmap/computeWeights.fx
- Timestamp:
- 03/08/07 16:59:38 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/pathmap/computeWeights.fx
r2197 r2212 84 84 } 85 85 } 86 /* 87 float4 88 psAggregateWeights(vsOutputComputeWeights input, in int rid : VPOS) : COLOR0 89 { 90 float sumWeight = 0.0; 91 float sumProb = 0.0000001; 92 93 int iRadion = clusterStarts[rid]; 94 float2 wTex = float2((iRadion / 4096 + 0.5) * dataColumnWidth, 95 (iRadion % 4096 + 0.5) / 4096.0) ); 96 while(iRadion < clusterStarts[rid+1]) 97 { 98 sumWeight += tex2Dlod(weightSampler, float4(wTex, 0, 1)); 99 float sumProb += 1.0; 100 wTex.y += 1.0 / 4096.0; 101 } 102 return (sumWeight / sumProb).xxxx; 103 } 104 105 technique AggregateWeights{ 106 pass P0 107 { 108 VertexShader = compile vs_3_0 vsComputeWeights(); 109 PixelShader = compile ps_3_0 psAggregateWeights(); 110 } 111 } 112 */
Note: See TracChangeset
for help on using the changeset viewer.