Meta_SurfaceShaderDefinition
Module: Metanodes / Definitions
A SurfaceShaderDefinition represents a shader object, expected to be used by a Meta_SurfaceShaderInstance. More...
#include <meta_division.hpp>
Public Types
| Type | Name |
|---|---|
| enum | Version { CurrentVersion =1 } |
| enum | IDX { Idx_Version, Idx_Filename, Idx_SourceCode } |
Public Functions
| Type | Name |
|---|---|
| Meta_SurfaceShaderDefinition() |
Detailed Description
struct Meta_SurfaceShaderDefinition;
A SurfaceShaderDefinition represents a shader object, expected to be used by a Meta_SurfaceShaderInstance.
The inputs to the shader will be set by this nodes Meta_MaterialParameter children.
Expected Implementation Details:-
When the SourceCode property changes a search for <params> defined within it is initiated, which in turn will extract the expected inputs for the shader. Meta_MaterialParameter nodes corresponding to these parameters will be created as children of the Meta_SurfaceShaderDefinition with their defined default values, allowing the user to easily configure the shader from the property panel or a script. If these #pragma's are missing in the source the user will have to manually create the child Meta_MaterialParameter nodes and set their values.
Public Types Documentation
enum Version
| Enumerator | Value | Description |
|---|---|---|
| CurrentVersion | =1 |
enum IDX
| Enumerator | Value | Description |
|---|---|---|
| Idx_Version | version number of this metanode, for potential future upgrade hooks | |
| Idx_Filename | path to a ".surf" shader file on disk | |
| Idx_SourceCode | source code, populated by the GUI or loaded from a file using the Filename property |
Public Functions Documentation
Meta_SurfaceShaderDefinition
inline Meta_SurfaceShaderDefinition()