OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
Ogre::ShadowVolumeExtrudeProgram Class Reference

Static class containing source for vertex programs for extruding shadow volumes. More...

#include <OgreShadowVolumeExtrudeProgram.h>

+ Inheritance diagram for Ogre::ShadowVolumeExtrudeProgram:

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

static void AddInternalProgram (String name, String source, String language, String entryPoint, String target, GpuProgramType type)
 Add and load high level gpu program. More...
 
static const StringgetDirectionalLightExtruderArbvp1 (void)
 Get extruder program source for directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1Debug (void)
 Get extruder program source for debug directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1 (void)
 Get extruder program source for directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_4_0 (void)
 Get extruder program source for directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0Debug (void)
 Get extruder program source for debug directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0Finite (void)
 Get FINITE extruder program source for directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_glsl (void)
 Get extruder program source for directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glslDebug (void)
 Get extruder program source for debug directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glsles (void)
 Get extruder program source for directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesDebug (void)
 Get extruder program source for debug directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesFinite (void)
 Get FINITE extruder program source for directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesFiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslFinite (void)
 Get FINITE extruder program source for directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glslFiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderArbvp1 (void)
 Get extruder program source for point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1Debug (void)
 Get extruder program source for debug point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderVs_1_1 (void)
 Get extruder program source for point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1FiniteDebug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_4_0 (void)
 Get extruder program source for point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0Debug (void)
 Get extruder program source for debug point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0Finite (void)
 Get FINITE extruder program source for point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0FiniteDebug (void)
 Get extruder program source for debug point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_glsl (void)
 Get extruder program source for point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glslDebug (void)
 Get extruder program source for debug point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glsles (void)
 Get extruder program source for point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesDebug (void)
 Get extruder program source for debug point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesFinite (void)
 Get FINITE extruder program source for point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesFiniteDebug (void)
 Get extruder program source for debug point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslFinite (void)
 Get FINITE extruder program source for point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glslFiniteDebug (void)
 Get extruder program source for debug point lights, compatible with glsl. More...
 
static const StringgetProgramName (Light::LightTypes lightType, bool finite, bool debug)
 
static const StringgetProgramSource (Light::LightTypes lightType, const String &syntax, bool finite, bool debug)
 General purpose method to get any of the program sources. More...
 
static void initialise (void)
 Initialise the creation of these vertex programs. More...
 
static void initialiseModulationPassPrograms (void)
 Initialise the creation of these modulation pass programs. More...
 
static void shutdown (void)
 Shutdown & destroy the vertex programs. More...
 

Static Public Attributes

static String frgProgramName
 
static const String programNames [OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS]
 

Detailed Description

Static class containing source for vertex programs for extruding shadow volumes.

Remarks
This exists so we don't have to be dependent on an external media files. Assembler is used so we don't have to rely on particular plugins. The assembler contents of this file were generated from the following Cg:
// Point light shadow volume extrude
void shadowVolumeExtrudePointLight_vp (
float4 position : POSITION,
float wcoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProjMatrix,
uniform float4 lightPos // homogeneous, 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, // homogeneous, 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, // homogeneous, 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);
}

Member Enumeration Documentation

◆ Programs

Enumerator
POINT_LIGHT 
POINT_LIGHT_DEBUG 
DIRECTIONAL_LIGHT 
DIRECTIONAL_LIGHT_DEBUG 
POINT_LIGHT_FINITE 
POINT_LIGHT_FINITE_DEBUG 
DIRECTIONAL_LIGHT_FINITE 
DIRECTIONAL_LIGHT_FINITE_DEBUG 

Member Function Documentation

◆ initialise()

static void Ogre::ShadowVolumeExtrudeProgram::initialise ( void  )
static

Initialise the creation of these vertex programs.

◆ initialiseModulationPassPrograms()

static void Ogre::ShadowVolumeExtrudeProgram::initialiseModulationPassPrograms ( void  )
static

Initialise the creation of these modulation pass programs.

◆ AddInternalProgram()

static void Ogre::ShadowVolumeExtrudeProgram::AddInternalProgram ( String  name,
String  source,
String  language,
String  entryPoint,
String  target,
GpuProgramType  type 
)
static

Add and load high level gpu program.

◆ shutdown()

static void Ogre::ShadowVolumeExtrudeProgram::shutdown ( void  )
static

Shutdown & destroy the vertex programs.

◆ getPointLightExtruderArbvp1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with arbvp1.

◆ getPointLightExtruderVs_1_1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_4_0()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_glsl()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsl ( void  )
inlinestatic

Get extruder program source for point lights, compatible with glsl.

◆ getPointLightExtruderVs_glsles()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsles ( void  )
inlinestatic

Get extruder program source for point lights, compatible with glsles.

◆ getDirectionalLightExtruderArbvp1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderVs_1_1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_4_0()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_glsl()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsl ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glsles()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsles ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with glsles.

◆ getPointLightExtruderArbvp1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with arbvp1.

◆ getPointLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_4_0Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_glslDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsl.

◆ getPointLightExtruderVs_glslesDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsles.

◆ getDirectionalLightExtruderArbvp1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_4_0Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_glslDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslDebug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glslesDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesDebug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with glsles.

◆ getProgramSource()

static const String& Ogre::ShadowVolumeExtrudeProgram::getProgramSource ( Light::LightTypes  lightType,
const String syntax,
bool  finite,
bool  debug 
)
static

General purpose method to get any of the program sources.

◆ getProgramName()

static const String& Ogre::ShadowVolumeExtrudeProgram::getProgramName ( Light::LightTypes  lightType,
bool  finite,
bool  debug 
)
static

◆ getPointLightExtruderArbvp1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with arbvp1.

◆ getPointLightExtruderVs_1_1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_4_0Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_glslFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFinite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with glsl.

◆ getPointLightExtruderVs_glslesFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFinite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with glsles.

◆ getDirectionalLightExtruderArbvp1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderVs_1_1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_4_0Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_glslFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFinite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glslesFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFinite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with glsles.

◆ getPointLightExtruderArbvp1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug point lights, compatible with arbvp1.

◆ getPointLightExtruderVs_1_1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1FiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_4_0FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0FiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_glslFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsl.

◆ getPointLightExtruderVs_glslesFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsles.

◆ getDirectionalLightExtruderArbvp1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderVs_1_1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_4_0FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_glslFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glslesFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with glsles.

Member Data Documentation

◆ programNames

const String Ogre::ShadowVolumeExtrudeProgram::programNames[OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS]
static

◆ frgProgramName

String Ogre::ShadowVolumeExtrudeProgram::frgProgramName
static

The documentation for this class was generated from the following file: