Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 3.05 KB

ShaderData.rst

File metadata and controls

79 lines (49 loc) · 3.05 KB

ShaderData

Special type of data block that stores information about a handwritten shader.

Inherit:

SimObject

Description

To use hand written shaders, a ShaderData datablock must be used. This datablock refers only to the vertex and pixel shader filenames and a hardware target level. Shaders are API specific, so DirectX and OpenGL shaders must be explicitly identified.

Example:

// Used for the procedural clould system
singleton ShaderData( CloudLayerShader )
{
   DXVertexShaderFile   = "shaders/common/cloudLayerV.hlsl";
   DXPixelShaderFile    = "shaders/common/cloudLayerP.hlsl";
   OGLVertexShaderFile = "shaders/common/gl/cloudLayerV.glsl";
   OGLPixelShaderFile = "shaders/common/gl/cloudLayerP.glsl";
   pixVersion = 2.0;
};

Methods

Fields