FnUsdAbstractionLib 0.6.0
|
Interface to define shader source code. More...
#include <ShaderSource.h>
Public Member Functions | |
ShaderSource (const MaterialSource &materialSourceGen, const ShaderSchema *schema, std::stringstream &sourceDest) | |
const SourceCodeGenerator & | sourceTypeGenerator () const |
Returns the SourceCodeGenerator that created this MaterialSource. | |
const usg::Token & | sourceType () const |
Returns the source target type of the generator. | |
const MaterialSource & | materialSource () const |
Returns the MaterialSource that created this ShaderSource. | |
virtual void | startFunction ()=0 |
Starts a shader function with the given set of inputs. | |
virtual void | emitLine (const std::string &line)=0 |
Emits the shader line source. | |
virtual std::string | input (const std::string &name)=0 |
Returns code required to retrieve a value from the named input. | |
virtual std::string | sampleTexture (const std::string &inputName, const std::string &texCoordVarName)=0 |
Returns code that allows sampling of a texture at the given texture coordinate. | |
virtual void | output (const std::string &name, const std::string &expression)=0 |
Declares and defines a shader output to be equal to the given expression. | |
virtual void | endFunction ()=0 |
Ends the shader function. | |
virtual fdk::StringList | inputs () const =0 |
Return the list of named inputs created by calls to input(). | |
virtual const fdk::StringSet & | textures () const =0 |
Return the list of named texture inputs created by calls to input(). | |
Protected Attributes | |
const MaterialSource & | _materialSource |
const ShaderSchema * | _shaderSchema |
std::stringstream & | _sourceDest |
Interface to define shader source code.
©2025 The Foundry Visionmongers, Ltd. All Rights Reserved. |