#include <OgreShadowVolumeExtrudeProgram.h>
Public Types | |
enum | Programs { POINT_LIGHT = 0, POINT_LIGHT_DEBUG = 1, DIRECTIONAL_LIGHT = 2, DIRECTIONAL_LIGHT_DEBUG = 3, POINT_LIGHT_FINITE = 4, POINT_LIGHT_FINITE_DEBUG = 5, DIRECTIONAL_LIGHT_FINITE = 6, DIRECTIONAL_LIGHT_FINITE_DEBUG = 7 } |
Static Public Member Functions | |
void | initialise (void) |
Initialise the creation of these vertex programs. | |
void | shutdown (void) |
Shutdown & destroy the vertex programs. | |
const String & | getPointLightExtruderArbvp1 (void) |
Get extruder program source for point lights, compatible with arbvp1. | |
const String & | getPointLightExtruderVs_1_1 (void) |
Get extruder program source for point lights, compatible with vs_1_1. | |
const String & | getDirectionalLightExtruderArbvp1 (void) |
Get extruder program source for directional lights, compatible with arbvp1. | |
const String & | getDirectionalLightExtruderVs_1_1 (void) |
Get extruder program source for directional lights, compatible with vs_1_1. | |
const String & | getPointLightExtruderArbvp1Debug (void) |
Get extruder program source for debug point lights, compatible with arbvp1. | |
const String & | getPointLightExtruderVs_1_1Debug (void) |
Get extruder program source for debug point lights, compatible with vs_1_1. | |
const String & | getDirectionalLightExtruderArbvp1Debug (void) |
Get extruder program source for debug directional lights, compatible with arbvp1. | |
const String & | getDirectionalLightExtruderVs_1_1Debug (void) |
Get extruder program source for debug directional lights, compatible with vs_1_1. | |
const String & | getProgramSource (Light::LightTypes lightType, const String syntax, bool finite, bool debug) |
General purpose method to get any of the program sources. | |
const String & | getProgramName (Light::LightTypes lightType, bool finite, bool debug) |
const String & | getPointLightExtruderArbvp1Finite (void) |
Get FINITE extruder program source for point lights, compatible with arbvp1. | |
const String & | getPointLightExtruderVs_1_1Finite (void) |
Get FINITE extruder program source for point lights, compatible with vs_1_1. | |
const String & | getDirectionalLightExtruderArbvp1Finite (void) |
Get FINITE extruder program source for directional lights, compatible with arbvp1. | |
const String & | getDirectionalLightExtruderVs_1_1Finite (void) |
Get FINITE extruder program source for directional lights, compatible with vs_1_1. | |
const String & | getPointLightExtruderArbvp1FiniteDebug (void) |
Get FINITE extruder program source for debug point lights, compatible with arbvp1. | |
const String & | getPointLightExtruderVs_1_1FiniteDebug (void) |
Get extruder program source for debug point lights, compatible with vs_1_1. | |
const String & | getDirectionalLightExtruderArbvp1FiniteDebug (void) |
Get FINITE extruder program source for debug directional lights, compatible with arbvp1. | |
const String & | getDirectionalLightExtruderVs_1_1FiniteDebug (void) |
Get FINITE extruder program source for debug directional lights, compatible with vs_1_1. | |
Static Public Attributes | |
const String | programNames [OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS] |
Static Private Attributes | |
String | mPointArbvp1 |
String | mPointVs_1_1 |
String | mDirArbvp1 |
String | mDirVs_1_1 |
String | mPointArbvp1Debug |
String | mPointVs_1_1Debug |
String | mDirArbvp1Debug |
String | mDirVs_1_1Debug |
String | mPointArbvp1Finite |
String | mPointVs_1_1Finite |
String | mDirArbvp1Finite |
String | mDirVs_1_1Finite |
String | mPointArbvp1FiniteDebug |
String | mPointVs_1_1FiniteDebug |
String | mDirArbvp1FiniteDebug |
String | mDirVs_1_1FiniteDebug |
bool | mInitialised |
// Point light shadow volume extrude void shadowVolumeExtrudePointLight_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos // homogenous, object space ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float4 newpos = (wcoord.xxxx * lightPos) + float4(position.xyz - lightPos.xyz, 0); oPosition = mul(worldViewProjMatrix, newpos); } // Directional light extrude void shadowVolumeExtrudeDirLight_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos // homogenous, object space ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float4 newpos = (wcoord.xxxx * (position + lightPos)) - lightPos; oPosition = mul(worldViewProjMatrix, newpos); } // Point light shadow volume extrude - FINITE void shadowVolumeExtrudePointLightFinite_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos, // homogenous, object space uniform float extrusionDistance // how far to extrude ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float3 extrusionDir = position.xyz - lightPos.xyz; extrusionDir = normalize(extrusionDir); float4 newpos = float4(position.xyz + ((1 - wcoord.x) * extrusionDistance * extrusionDir), 1); oPosition = mul(worldViewProjMatrix, newpos); } // Directional light extrude - FINITE void shadowVolumeExtrudeDirLightFinite_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos, // homogenous, object space uniform float extrusionDistance // how far to extrude ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 // -ve lightPos is direction float4 newpos = float4(position.xyz - (wcoord.x * extrusionDistance * lightPos.xyz), 1); oPosition = mul(worldViewProjMatrix, newpos); }
Definition at line 126 of file OgreShadowVolumeExtrudeProgram.h.
|
Definition at line 153 of file OgreShadowVolumeExtrudeProgram.h. |
|
Get extruder program source for directional lights, compatible with arbvp1.
Definition at line 184 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for debug directional lights, compatible with arbvp1.
Definition at line 193 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for directional lights, compatible with arbvp1.
Definition at line 211 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for debug directional lights, compatible with arbvp1.
Definition at line 220 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for directional lights, compatible with vs_1_1.
Definition at line 186 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for debug directional lights, compatible with vs_1_1.
Definition at line 195 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for directional lights, compatible with vs_1_1.
Definition at line 213 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.
Definition at line 222 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for point lights, compatible with arbvp1.
Definition at line 180 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for debug point lights, compatible with arbvp1.
Definition at line 189 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for point lights, compatible with arbvp1.
Definition at line 207 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for debug point lights, compatible with arbvp1.
Definition at line 216 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for point lights, compatible with vs_1_1.
Definition at line 182 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for debug point lights, compatible with vs_1_1.
Definition at line 191 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get FINITE extruder program source for point lights, compatible with vs_1_1.
Definition at line 209 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
Get extruder program source for debug point lights, compatible with vs_1_1.
Definition at line 218 of file OgreShadowVolumeExtrudeProgram.h. References Ogre::String. |
|
|
|
General purpose method to get any of the program sources.
|
|
Initialise the creation of these vertex programs.
|
|
Shutdown & destroy the vertex programs.
|
|
Definition at line 131 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 136 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 141 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 146 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 132 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 137 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 142 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 147 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 149 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 129 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 134 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 139 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 144 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 130 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 135 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 140 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 145 of file OgreShadowVolumeExtrudeProgram.h. |
|
Definition at line 173 of file OgreShadowVolumeExtrudeProgram.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:44:09 2006