Changeset 2054 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Timestamp:
- 01/24/07 21:44:30 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic.program
r2024 r2054 50 50 entry_point VPos 51 51 target vs_1_1 52 } 53 54 vertex_program GTP/Basic/MPos_VS hlsl 55 { 56 source GTPBasic_VS.hlsl 57 entry_point MPos 58 target vs_1_1 59 } 60 61 vertex_program GTP/Basic/MPos_NoTransform_VS hlsl 62 { 63 source GTPBasic_VS.hlsl 64 entry_point MPos_NoTransform 65 target vs_1_1 52 66 } 53 67 … … 56 70 source GTPBasic_VS.hlsl 57 71 entry_point CPos 72 target vs_1_1 73 } 74 75 vertex_program GTP/Basic/Shaded_CPos_VS hlsl 76 { 77 source GTPBasic_VS.hlsl 78 entry_point Shaded_CPos_VS 58 79 target vs_1_1 59 80 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic_VS.hlsl
r2024 r2054 153 153 } 154 154 155 struct MPos_OUT 156 { 157 float4 VPos : POSITION; 158 float4 MPos : TEXCOORD0; 159 }; 160 161 MPos_OUT MPos(float4 position : POSITION0, 162 uniform float4x4 WorldViewProj) 163 { 164 MPos_OUT OUT; 165 OUT.VPos = mul(WorldViewProj, position); 166 OUT.MPos = position; 167 return OUT; 168 } 169 170 MPos_OUT MPos_NoTransform(float4 position : POSITION0) 171 { 172 MPos_OUT OUT; 173 OUT.VPos = position; 174 OUT.MPos = position; 175 return OUT; 176 } 155 177 156 178 struct CPos_OUT … … 168 190 OUT.CPos = mul(WorldView, position); 169 191 return OUT; 192 } 193 194 struct Shaded_CPos_OUT 195 { 196 float4 vPos : POSITION; 197 float4 wNormal : TEXCOORD0; 198 float4 wPos : TEXCOORD1; 199 float4 CPos : TEXCOORD2; 200 }; 201 202 Shaded_CPos_OUT Shaded_CPos_VS(float4 position : POSITION, 203 float4 normal : NORMAL, 204 uniform float4x4 WorldViewProj, 205 uniform float4x4 World, 206 uniform float4x4 WorldView, 207 uniform float4x4 WorldInv) 208 { 209 Shaded_CPos_OUT OUT; 210 OUT.vPos = mul(WorldViewProj, position); 211 OUT.wPos = mul(World, position); 212 OUT.CPos = mul(WorldView, position); 213 OUT.wNormal = mul(normal, WorldInv); 214 return OUT; 170 215 } 171 216
Note: See TracChangeset
for help on using the changeset viewer.