|
Special type of data block that stores information about a handwritten shader. More...
Public Member Functions | |
void | reload () |
Rebuilds all the vertex and pixel shaders instances created from this ShaderData. | |
Public Attributes | |
string | defines |
A semicolon, tab, or newline delimited string of case sensitive defines that are passed to the shader compiler. | |
filename | DXPixelShaderFile |
Indicates a filename that contains a DirectX pixel shader program. | |
filename | DXVertexShaderFile |
Indicates a filename that contains a DirectX vertex shader program. | |
filename | OGLPixelShaderFile |
Indicates a filename that contains a DirectX pixel shader program. | |
filename | OGLVertexShaderFile |
Indicates a filename that contains an OpenGL vertex shader program. | |
float | pixVersion |
This indicates what target level of shader should be compiled. | |
bool | useDevicePixVersion |
True to use the maximum pixel shader version offered by the graphics card, rather than manually specifying the version in script. |
Special type of data block that stores information about a handwritten shader.
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.
// 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; };
void ShaderData::reload | ( | ) |
Rebuilds all the vertex and pixel shaders instances created from this ShaderData.
// Rebuild the shader instances from ShaderData CloudLayerShader
CloudLayerShader.reload();
string ShaderData::defines |
A semicolon, tab, or newline delimited string of case sensitive defines that are passed to the shader compiler.
filename ShaderData::DXPixelShaderFile |
Indicates a filename that contains a DirectX pixel shader program.
It must contain only one program and no vertex shader, just the pixel shader. It can be either an HLSL or assembly level shader. The former must have a filename extension of .hlsl, otherwise it assumes it is an assembly file.
filename ShaderData::DXVertexShaderFile |
Indicates a filename that contains a DirectX vertex shader program.
It must contain only one program and no pixel shader, just the vertex shader.It can be either an HLSL or assembly level shader. The former must have a filename extension of .hlsl, otherwise it assumes it is an assembly file.
filename ShaderData::OGLPixelShaderFile |
Indicates a filename that contains a DirectX pixel shader program.
It must contain only one program and no vertex shader, just the pixel shader.
filename ShaderData::OGLVertexShaderFile |
Indicates a filename that contains an OpenGL vertex shader program.
It must contain only one program and no pixel shader, just the vertex shader.
float ShaderData::pixVersion |
This indicates what target level of shader should be compiled.
Valid numbers at the time of this writing are 1.1, 1.4, 2.0, and 3.0. The shader will not run properly if your hardware does not support the level of shader you have compiled.
True to use the maximum pixel shader version offered by the graphics card, rather than manually specifying the version in script.