|
[Ogre-cvsmail] ogrenew/PlugIns/OctreeSceneManager/include OgreTerrainVertexProgram.h,1.1,1.2
From: <sinbad@us...> - 2005-01-30 13:59
|
Update of /cvsroot/ogre/ogrenew/PlugIns/OctreeSceneManager/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22381/PlugIns/OctreeSceneManager/include
Modified Files:
OgreTerrainVertexProgram.h
Log Message:
Terrain now supports texture shadows
Index: OgreTerrainVertexProgram.h
===================================================================
RCS file: /cvsroot/ogre/ogrenew/PlugIns/OctreeSceneManager/include/OgreTerrainVertexProgram.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OgreTerrainVertexProgram.h 6 Jun 2004 01:15:51 -0000 1.1
--- OgreTerrainVertexProgram.h 30 Jan 2005 13:59:39 -0000 1.2
***************
*** 165,168 ****
--- 165,197 ----
}
+ // Shadow receiver vertex program
+ void terrain_shadow_receiver_vp(
+ float4 position : POSITION,
+ float2 uv1 : TEXCOORD0,
+ float2 uv2 : TEXCOORD1,
+ float delta : BLENDWEIGHT,
+
+ out float4 oPosition : POSITION,
+ out float2 oUv1 : TEXCOORD0,
+ out float4 colour : COLOR,
+ uniform float4x4 worldViewProj,
+ uniform float4x4 world,
+ uniform float4x4 textureViewProj,
+ uniform float morphFactor
+ )
+ {
+ // Apply morph
+ position.y = position.y + (delta.x * morphFactor);
+ // world / view / projection
+ oPosition = mul(worldViewProj, position);
+
+ // Main texture coords
+ float4 worldpos = mul(world, position);
+ float4 projuv = mul(textureViewProj, worldpos);
+ oUv1.xy = projuv.xy / projuv.w;
+ // Full bright (no lighting)
+ colour = float4(1,1,1,1);
+ }
+
@endcode
*/
***************
*** 174,177 ****
--- 203,207 ----
static String mExpFogArbvp1;
static String mExp2FogArbvp1;
+ static String mShadowReceiverArbvp1;
static String mNoFogVs_1_1;
***************
*** 179,186 ****
static String mExpFogVs_1_1;
static String mExp2FogVs_1_1;
public:
/// General purpose method to get any of the program sources
! static const String& getProgramSource(FogMode fogMode, const String syntax);
--- 209,218 ----
static String mExpFogVs_1_1;
static String mExp2FogVs_1_1;
+ static String mShadowReceiverVs_1_1;
public:
/// General purpose method to get any of the program sources
! static const String& getProgramSource(FogMode fogMode,
! const String syntax, bool shadowReceiver = false);
|
| Thread | Author | Date |
|---|---|---|
| [Ogre-cvsmail] ogrenew/PlugIns/OctreeSceneManager/include OgreTerrainVertexProgram.h,1.1,1.2 | <sinbad@us...> |