| OGRE 1.10.11 Object-Oriented Graphics Rendering Engine

Public Types | Static Public Member Functions | Static Public Attributes | List of all members
Ogre::ShadowVolumeExtrudeProgram Class Reference
Core » Scene

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

`#include <OgreShadowVolumeExtrudeProgram.h>`

Inheritance diagram for Ogre::ShadowVolumeExtrudeProgram:
[legend]

## 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 String & | getDirectionalLightExtruderArbvp1 (void)
| Get extruder program source for directional lights, compatible with arbvp1. More...
static const String & | getDirectionalLightExtruderArbvp1Debug (void)
| Get extruder program source for debug directional lights, compatible with arbvp1. More...
static const String & | getDirectionalLightExtruderArbvp1Finite (void)
| Get FINITE extruder program source for directional lights, compatible with arbvp1. More...
static const String & | getDirectionalLightExtruderArbvp1FiniteDebug (void)
| Get FINITE extruder program source for debug directional lights, compatible with arbvp1. More...
static const String & | getDirectionalLightExtruderVs_1_1 (void)
| Get extruder program source for directional lights, compatible with vs_1_1. More...
static const String & | getDirectionalLightExtruderVs_1_1Debug (void)
| Get extruder program source for debug directional lights, compatible with vs_1_1. More...
static const String & | getDirectionalLightExtruderVs_1_1Finite (void)
| Get FINITE extruder program source for directional lights, compatible with vs_1_1. More...
static const String & | getDirectionalLightExtruderVs_1_1FiniteDebug (void)
| Get FINITE extruder program source for debug directional lights, compatible with vs_1_1. More...
static const String & | getDirectionalLightExtruderVs_4_0 (void)
| Get extruder program source for directional lights, compatible with vs_4_0. More...
static const String & | getDirectionalLightExtruderVs_4_0Debug (void)
| Get extruder program source for debug directional lights, compatible with vs_4_0. More...
static const String & | getDirectionalLightExtruderVs_4_0Finite (void)
| Get FINITE extruder program source for directional lights, compatible with vs_4_0. More...
static const String & | getDirectionalLightExtruderVs_4_0FiniteDebug (void)
| Get FINITE extruder program source for debug directional lights, compatible with vs_4_0. More...
static const String & | getDirectionalLightExtruderVs_glsl (void)
| Get extruder program source for directional lights, compatible with glsl. More...
static const String & | getDirectionalLightExtruderVs_glslDebug (void)
| Get extruder program source for debug directional lights, compatible with glsl. More...
static const String & | getDirectionalLightExtruderVs_glsles (void)
| Get extruder program source for directional lights, compatible with glsles. More...
static const String & | getDirectionalLightExtruderVs_glslesDebug (void)
| Get extruder program source for debug directional lights, compatible with glsles. More...
static const String & | getDirectionalLightExtruderVs_glslesFinite (void)
| Get FINITE extruder program source for directional lights, compatible with glsles. More...
static const String & | getDirectionalLightExtruderVs_glslesFiniteDebug (void)
| Get FINITE extruder program source for debug directional lights, compatible with glsles. More...
static const String & | getDirectionalLightExtruderVs_glslFinite (void)
| Get FINITE extruder program source for directional lights, compatible with glsl. More...
static const String & | getDirectionalLightExtruderVs_glslFiniteDebug (void)
| Get FINITE extruder program source for debug directional lights, compatible with glsl. More...
static const String & | getPointLightExtruderArbvp1 (void)
| Get extruder program source for point lights, compatible with arbvp1. More...
static const String & | getPointLightExtruderArbvp1Debug (void)
| Get extruder program source for debug point lights, compatible with arbvp1. More...
static const String & | getPointLightExtruderArbvp1Finite (void)
| Get FINITE extruder program source for point lights, compatible with arbvp1. More...
static const String & | getPointLightExtruderArbvp1FiniteDebug (void)
| Get FINITE extruder program source for debug point lights, compatible with arbvp1. More...
static const String & | getPointLightExtruderVs_1_1 (void)
| Get extruder program source for point lights, compatible with vs_1_1. More...
static const String & | getPointLightExtruderVs_1_1Debug (void)
| Get extruder program source for debug point lights, compatible with vs_1_1. More...
static const String & | getPointLightExtruderVs_1_1Finite (void)
| Get FINITE extruder program source for point lights, compatible with vs_1_1. More...
static const String & | getPointLightExtruderVs_1_1FiniteDebug (void)
| Get extruder program source for debug point lights, compatible with vs_1_1. More...
static const String & | getPointLightExtruderVs_4_0 (void)
| Get extruder program source for point lights, compatible with vs_4_0. More...
static const String & | getPointLightExtruderVs_4_0Debug (void)
| Get extruder program source for debug point lights, compatible with vs_4_0. More...
static const String & | getPointLightExtruderVs_4_0Finite (void)
| Get FINITE extruder program source for point lights, compatible with vs_4_0. More...
static const String & | getPointLightExtruderVs_4_0FiniteDebug (void)
| Get extruder program source for debug point lights, compatible with vs_4_0. More...
static const String & | getPointLightExtruderVs_glsl (void)
| Get extruder program source for point lights, compatible with glsl. More...
static const String & | getPointLightExtruderVs_glslDebug (void)
| Get extruder program source for debug point lights, compatible with glsl. More...
static const String & | getPointLightExtruderVs_glsles (void)
| Get extruder program source for point lights, compatible with glsles. More...
static const String & | getPointLightExtruderVs_glslesDebug (void)
| Get extruder program source for debug point lights, compatible with glsles. More...
static const String & | getPointLightExtruderVs_glslesFinite (void)
| Get FINITE extruder program source for point lights, compatible with glsles. More...
static const String & | getPointLightExtruderVs_glslesFiniteDebug (void)
| Get extruder program source for debug point lights, compatible with glsles. More...
static const String & | getPointLightExtruderVs_glslFinite (void)
| Get FINITE extruder program source for point lights, compatible with glsl. More...
static const String & | getPointLightExtruderVs_glslFiniteDebug (void)
| Get extruder program source for debug point lights, compatible with glsl. More...
static const String & | getProgramName (Light::LightTypes lightType, bool finite, bool debug)
static const String & | getProgramSource (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

enum Ogre::ShadowVolumeExtrudeProgram::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 |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_1_1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1 | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_4_0()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0 | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glsl()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsl | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glsles()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsles | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderArbvp1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1 | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_1_1()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1 | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_4_0()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0 | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glsl()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsl | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glsles()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsles | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderArbvp1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Debug | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Debug | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslDebug | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslesDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesDebug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderArbvp1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Debug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Debug | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslDebug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslesDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesDebug | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_1_1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Finite | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFinite | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslesFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFinite | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderArbvp1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Finite | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_1_1Finite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Finite | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFinite | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslesFinite()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFinite | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderArbvp1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1FiniteDebug | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_1_1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1FiniteDebug | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFiniteDebug | ( | void |  | ) |
| inline static

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

## ◆ getPointLightExtruderVs_glslesFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFiniteDebug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderArbvp1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1FiniteDebug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_1_1FiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1FiniteDebug | ( | void |  | ) |
| inline static

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 |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFiniteDebug | ( | void |  | ) |
| inline static

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

## ◆ getDirectionalLightExtruderVs_glslesFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFiniteDebug | ( | void |  | ) |
| inline static

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:

- OgreShadowVolumeExtrudeProgram.h