Changeset 1519 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs
- Timestamp:
- 09/27/06 16:04:44 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_ReduceCubeMap.hlsl
r777 r1519 24 24 OUT.hPosition = IN.Position; 25 25 OUT.Position = IN.Position.xy; 26 //OUT.Position.y = 1 - OUT.Position.y; 26 27 return OUT; 27 28 } … … 31 32 { 32 33 RATE = 32; 34 CUBEMAP_SIZE = 128; 33 35 float4 color = 0; 34 36 // color += texCUBE( EnvironmentMapSampler, Tex ); … … 47 49 if (nFace == 2) dir = float3(pos.x, 1, -pos.y); 48 50 if (nFace == 3) dir = float3(pos.x, -1, pos.y); 49 if (nFace == 4) dir = float3(pos.x y, 1);51 if (nFace == 4) dir = float3(pos.x, pos.y, 1); 50 52 if (nFace == 5) dir = float3(-pos.x, pos.y,-1); 51 53 52 color += readCubeMap( EnvironmentMapSampler, dir);54 color += texCUBE( EnvironmentMapSampler, dir); 53 55 } 56 /* 57 if (nFace == 0) dir = float3(1, 0, 0); 58 if (nFace == 1) dir = float3(-1, 0, 0); 59 if (nFace == 2) dir = float3(0, 1, 0); 60 if (nFace == 3) dir = float3(0, -1, 0); 61 if (nFace == 4) dir = float3(0, 0, 1); 62 if (nFace == 5) dir = float3(0, 0,-1); 63 64 return texCUBE(EnvironmentMapSampler, dir);*/ 54 65 //return float4(IN.Position.xy,1,1); 55 66 return color / (RATE*RATE);
Note: See TracChangeset
for help on using the changeset viewer.