- Timestamp:
- 03/08/07 11:44:30 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo/PathMapWeightCompute.hlsl
r2202 r2207 28 28 output.pos = input.pos; 29 29 output.tex = input.tex; 30 output.tex.y = 1.0 - output.tex.y; 30 31 return output; 31 32 } … … 62 63 float4 ret = cosa * cosb; 63 64 65 float ize = 0; 66 if(pos.z > 0) ize = 1; 64 67 //return float4(lightDir + ret.x * 0.00000000001, 1); 65 return ret;66 //return ret.x*0.0000000001 + 0.5;68 //return ret; 69 return ret.x*0.0000000001 + ize; 67 70 } 68 71 … … 81 84 float2 coord1 = float2((float)(currentEntryPoint % nRadionColumns) / (float) nRadionColumns, 82 85 currentEntryPoint / (float) nRadionColumns / 4096.0) + hp; 83 coord1.y = 1.0 - coord1.y;84 86 float2 coord2 = coord1 + float2(hp.x / 2.0, 0); 85 87 float radrad = tex2Dlod(radionSampler, float4(coord2, 0, 0)).a; … … 99 101 return weight; 100 102 } 103 104 void EntryPointDisplayVS(float4 position :POSITION0, 105 float4 color :COLOR0, 106 uniform float4x4 worldViewProj, 107 out float4 hPos:POSITION, 108 out float2 texCoord: TEXCOORD0) 109 { 110 hPos = mul(worldViewProj, position); 111 texCoord = color.xy; 112 } 113 114 float4 EntryPointDisplayPS(float2 texCoord : TEXCOORD0, 115 uniform sampler2D weightTexture : register(s0)):COLOR0 116 { 117 //return texCoord.y; 118 return tex2D(weightTexture, texCoord).r; 119 } 120
Note: See TracChangeset
for help on using the changeset viewer.