C# 클래스 Axiom.Graphics.ShadowVolumeExtrudeProgram

Static class containing source for vertex programs for extruding shadow volumes.
This exists so we don't have to be dependent on an external media files. is used so we don't have to rely on particular plugins. 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 // 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); }
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
programNames string[]

공개 메소드들

메소드 설명
GetProgramName ( LightType lightType, bool finite, bool debug ) : string

General purpose method to get any of the program names based on the specified parameters.

GetProgramName ( Programs type ) : string

Gets the name of the program for the given type.

GetProgramSource ( LightType lightType, string syntax, bool finite, bool debug ) : string

General purpose method to get any of the program sources.

Initialize ( ) : void

Initialize the creation of these core vertex programs.

Shutdown ( ) : void

Called on engine shutdown; destroys all auto created gpu programs.

비공개 메소드들

메소드 설명
ShadowVolumeExtrudeProgram ( ) : System

This is a static class; don't allow instantiation.

메소드 상세

GetProgramName() 공개 정적인 메소드

General purpose method to get any of the program names based on the specified parameters.
public static GetProgramName ( LightType lightType, bool finite, bool debug ) : string
lightType LightType Type of light to get the source for.
finite bool Is this for finite volume extrusion?
debug bool Should the shadow volumes be visible?
리턴 string

GetProgramName() 공개 정적인 메소드

Gets the name of the program for the given type.
public static GetProgramName ( Programs type ) : string
type Programs
리턴 string

GetProgramSource() 공개 정적인 메소드

General purpose method to get any of the program sources.
public static GetProgramSource ( LightType lightType, string syntax, bool finite, bool debug ) : string
lightType LightType Type of light to get the source for.
syntax string Syntax code of interest.
finite bool Is this for finite volume extrusion?
debug bool Should the shadow volumes be visible?
리턴 string

Initialize() 공개 정적인 메소드

Initialize the creation of these core vertex programs.
public static Initialize ( ) : void
리턴 void

Shutdown() 공개 정적인 메소드

Called on engine shutdown; destroys all auto created gpu programs.
public static Shutdown ( ) : void
리턴 void

프로퍼티 상세

programNames 공개적으로 정적으로 프로퍼티

public static string[] programNames
리턴 string[]