|
void | setExtension (const string &extension) |
| Set the file extension for baked textures.
|
|
const string & | getExtension () const |
| Return the file extension for baked textures.
|
|
void | setColorSpace (const string &colorSpace) |
| Set the color space in which color textures are encoded. More...
|
|
const string & | getColorSpace () const |
| Return the color space in which color textures are encoded.
|
|
void | setDistanceUnit (const string &unitSpace) |
| Set the distance unit to which textures are baked. Defaults to meters.
|
|
const string & | getDistanceUnit () const |
| Return the distance unit to which textures are baked.
|
|
void | setAverageImages (bool enable) |
| Set whether images should be averaged to generate constants. Defaults to false.
|
|
bool | getAverageImages () const |
| Return whether images should be averaged to generate constants.
|
|
void | setOptimizeConstants (bool enable) |
| Set whether uniform textures should be stored as constants. Defaults to true.
|
|
bool | getOptimizeConstants () const |
| Return whether uniform textures should be stored as constants.
|
|
void | setOutputImagePath (const FilePath &outputImagePath) |
| Set the output location for baked texture images. More...
|
|
const FilePath & | getOutputImagePath () |
| Get the current output location for baked texture images.
|
|
void | setBakedGraphName (const string &name) |
| Set the name of the baked graph element.
|
|
const string & | getBakedGraphName () const |
| Return the name of the baked graph element.
|
|
void | setBakedGeomInfoName (const string &name) |
| Set the name of the baked geometry info element.
|
|
const string & | getBakedGeomInfoName () const |
| Return the name of the baked geometry info element.
|
|
const string & | getTextureFilenameTemplate () const |
| Get the texture filename template.
|
|
void | setTextureFilenameTemplate (const string &filenameTemplate) |
| Set the texture filename template.
|
|
void | setFilenameTemplateVarOverride (const string &key, const string &value) |
| Set texFilenameOverrides if template variable exists.
|
|
void | setOutputStream (std::ostream *outputStream) |
| Set the output stream for reporting progress and warnings. Defaults to std::cout.
|
|
std::ostream * | getOutputStream () const |
| Return the output stream for reporting progress and warnings.
|
|
void | setHashImageNames (bool enable) |
| Set whether to create a short name for baked images by hashing the baked image filenames This is useful for file systems which may have a maximum limit on filename size. More...
|
|
bool | getHashImageNames () const |
| Return whether automatic baked texture resolution is set.
|
|
void | setupUnitSystem (DocumentPtr unitDefinitions) |
| Set up the unit definitions to be used in baking.
|
|
void | bakeShaderInputs (NodePtr material, NodePtr shader, GenContext &context, const string &udim=EMPTY_STRING) |
| Bake textures for all graph inputs of the given shader.
|
|
void | bakeGraphOutput (OutputPtr output, GenContext &context, const StringMap &filenameTemplateMap) |
| Bake a texture for the given graph output.
|
|
void | optimizeBakedTextures (NodePtr shader) |
| Optimize baked textures before writing.
|
|
DocumentPtr | bakeMaterial (NodePtr shader, const StringVec &udimSet) |
| Write the baked material with textures to a document.
|
|
BakedDocumentVec | createBakeDocuments (DocumentPtr doc, const FileSearchPath &searchPath) |
| Bake all materials in the given document and return them as a vector.
|
|
void | bakeAllMaterials (DocumentPtr doc, const FileSearchPath &searchPath, const FilePath &outputFileName) |
| Bake all materials in the given document and write them to disk. More...
|
|
virtual | ~GlslRenderer () |
| Destructor.
|
|
void | initialize () override |
| Internal initialization of stages and OpenGL constructs required for program validation and rendering. More...
|
|
void | createProgram (ShaderPtr shader) override |
| Create GLSL program based on an input shader. More...
|
|
void | createProgram (const StageMap &stages) override |
| Create GLSL program based on shader stage source code. More...
|
|
void | validateInputs () override |
| Validate inputs for the program. More...
|
|
void | setSize (unsigned int width, unsigned int height) override |
| Set the size of the rendered image. More...
|
|
void | render () override |
| Render the current program to an offscreen buffer. More...
|
|
void | renderTextureSpace () |
| Render the current program in texture space to an off-screen buffer.
|
|
ImagePtr | captureImage (ImagePtr image=nullptr) override |
| Capture the current contents of the off-screen hardware buffer as an image. More...
|
|
GLFrameBufferPtr | getFrameBuffer () const |
| Return the GL frame buffer.
|
|
GlslProgramPtr | getProgram () |
| Return the GLSL program.
|
|
void | drawScreenSpaceQuad () |
| Submit geometry for a screen-space quad.
|
|
void | setClearColor (const Color4 &clearColor) |
| Sets the clear color.
|
|
void | setImageHandler (ImageHandlerPtr imageHandler) |
| Set the image handler used by this renderer for image I/O.
|
|
ImageHandlerPtr | getImageHandler () const |
| Return the image handler.
|
|
void | setLightHandler (LightHandlerPtr lightHandler) |
| Set the light handler used by this renderer for light bindings.
|
|
LightHandlerPtr | getLightHandler () const |
| Return the light handler.
|
|
void | setGeometryHandler (GeometryHandlerPtr geometryHandler) |
| Set the geometry handler.
|
|
GeometryHandlerPtr | getGeometryHandler () const |
| Return the geometry handler.
|
|
void | setViewHandler (ViewHandlerPtr viewHandler) |
| Set the view handler.
|
|
ViewHandlerPtr | getViewHandler () const |
| Return the view handler.
|
|
A helper class for baking procedural material content to textures.
TODO: Add support for graphs containing geometric nodes such as position and normal.