- Timestamp:
- 06/05/07 01:55:55 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPathMap/PathMap.hlsl
r2345 r2403 28 28 output.pos = mul(WorldViewProj, input.pos); 29 29 output.tex = input.tex; 30 output.texAtlas = input.tex Atlas;30 output.texAtlas = input.tex; 31 31 return output; 32 32 } … … 34 34 float4 psWalk(vsOutputWalk input) : COLOR 35 35 { 36 float2 texAtlas = input.texAtlas; 37 36 38 int2 prmAtlasTiles = prmAtlasTilesHalfPixel.xy; 37 39 float2 atlasHalfPixel = prmAtlasTilesHalfPixel.zw; … … 41 43 { 42 44 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; 45 47 46 48 float weightIndex = tex2D(clusterWeightIndexSampler, float2(((float)iCluster + 0.5) / clusterCount, 0.5)).r; 47 49 float3 weight = tex2D(clusterWeightSampler, float2((weightIndex + 0.5)/allClusterCount, 0.5)).rgb; 48 //weight = 0.0002 + 0.000000000001 * weight;49 50 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); 53 55 } 54 56 … … 56 58 57 59 //return float4(col,1); 58 return float4(col * color, 1); 60 //return float4(color + 0.0000000001 * col, 1) ; 61 return float4(col * color, 1); 59 62 60 63 61 64 //return float4(col,1) * 0.0000000000001 + tex2D(filteredAtlasSampler, float2(input.texAtlas.x / 32.0, input.texAtlas.y)); 62 65 } 63 66
Note: See TracChangeset
for help on using the changeset viewer.