Changeset 2207 for GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo
- Timestamp:
- 03/08/07 11:44:30 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo/PRMDemo.material
r2202 r2207 187 187 } 188 188 } 189 190 vertex_program GTP/EPDisplayVS hlsl 191 { 192 source PathMapWeightCompute.hlsl 193 entry_point EntryPointDisplayVS 194 target vs_2_0 195 } 196 fragment_program GTP/EPDisplayPS hlsl 197 { 198 source PathMapWeightCompute.hlsl 199 entry_point EntryPointDisplayPS 200 target ps_2_0 201 } 202 203 material GTP/PM/EPBillboards 204 { 205 technique 206 { 207 pass 208 { 209 polygon_mode points 210 point_size 10 211 vertex_program_ref GTP/EPDisplayVS 212 { 213 param_named_auto worldViewProj worldviewproj_matrix 214 } 215 fragment_program_ref GTP/EPDisplayPS 216 { 217 } 218 texture_unit 219 { 220 filtering none 221 } 222 } 223 } 224 } -
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.