|
HIO_API | HioGlslfx () |
| Create an invalid glslfx object.
|
|
HIO_API | HioGlslfx (std::string const &filePath, TfToken const &technique=HioGlslfxTokens->defVal) |
| Create a glslfx object from a file.
|
|
HIO_API | HioGlslfx (std::istream &is, TfToken const &technique=HioGlslfxTokens->defVal) |
| Create a glslfx object from a stream.
|
|
HIO_API HioGlslfxConfig::Parameters | GetParameters () const |
| Return the parameters specified in the configuration.
|
|
HIO_API HioGlslfxConfig::Textures | GetTextures () const |
| Return the textures specified in the configuration.
|
|
HIO_API HioGlslfxConfig::Attributes | GetAttributes () const |
| Return the attributes specified in the configuration.
|
|
HIO_API HioGlslfxConfig::MetadataDictionary | GetMetadata () const |
| Return the metadata specified in the configuration.
|
|
HIO_API bool | IsValid (std::string *reason=NULL) const |
| Returns true if this is a valid glslfx file.
|
|
HIO_API VtDictionary | GetLayoutAsDictionary (const TfTokenVector &shaderStageKeys, std::string *errorStr) const |
| Get the layout config as a VtDictionary parsed from the JSON layout config corresponding to the shader source associated with the given keys.
|
|
HIO_API std::string | GetSource (const TfToken &shaderStageKey) const |
| Get the shader source associated with given key.
|
|
const std::string & | GetFilePath () const |
| Get the original file name passed to the constructor.
|
|
const std::set< std::string > & | GetFiles () const |
| Return set of all files processed for this glslfx object.
|
|
size_t | GetHash () const |
| Return the computed hash value based on the string.
|
|
|
HIO_API std::string | GetSurfaceSource () const |
| Get the surface source string.
|
|
HIO_API std::string | GetDisplacementSource () const |
| Get the displacement source string.
|
|
HIO_API std::string | GetVolumeSource () const |
| Get the volume source string.
|
|
A class representing the config and shader source of a glslfx file.
a HioGlslfx object is constructed by providing the path of a file whose contents look something like this:
-- glslfx version 0.1
-- configuration
{
'textures' : {
'texture_1':{
'documentation' : 'a useful texture.',
},
'texture_2':{
'documentation' : 'another useful texture.',
},
},
'parameters': {
'param_1' : {
'default' : 1.0,
'documentation' : 'the first parameter'
},
'param_2' : {
'default' : [1.0, 1.0, 1.0],
'documentation' : 'a vec3f parameter'
},
'param_3' : {
'default' : 2.0
},
'param_4' : {
'default' : True
},
'param_5' : {
'default' : [1.0, 1.0, 1.0],
'role' : 'color'
'documentation' : 'specifies a color for use in the shader'
},
},
'parameterOrder': ['param_1',
'param_2',
'param_3',
'param_4',
'param_5'],
'techniques': {
'default': {
'fragmentShader': {
'source': [ 'MyFragment' ]
}
},
'metal': {
'fragmentShader': {
'source': [ 'MyFragment.Metal' ]
}
}
}
}
-- glsl MyFragment
uniform float param_1;
uniform float param_2;
uniform float param_3;
uniform float param_4;
uniform float param_5;
void main()
{
}
Definition at line 150 of file glslfx.h.