HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Util.h File Reference
+ Include dependency graph for Util.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UIProperties
 Set of possible UI properties for an element. More...
 
struct  UIPropertyItem
 Interface for holding the UI properties associated shader port. More...
 

Functions

Shader Utilities
MX_RENDER_API ShaderPtr createShader (const string &shaderName, GenContext &context, ElementPtr elem)
 Create a shader for a given element. More...
 
MX_RENDER_API ShaderPtr createConstantShader (GenContext &context, DocumentPtr stdLib, const string &shaderName, const Color3 &color)
 
MX_RENDER_API ShaderPtr createDepthShader (GenContext &context, DocumentPtr stdLib, const string &shaderName)
 
MX_RENDER_API ShaderPtr createAlbedoTableShader (GenContext &context, DocumentPtr stdLib, const string &shaderName)
 
MX_RENDER_API ShaderPtr createEnvPrefilterShader (GenContext &context, DocumentPtr stdLib, const string &shaderName)
 Create a shader that generates a prefiltered environment map. More...
 
MX_RENDER_API ShaderPtr createBlurShader (GenContext &context, DocumentPtr stdLib, const string &shaderName, const string &filterType, float filterSize)
 Create a blur shader, using the given standard libraries for code generation. More...
 

Variables

MATERIALX_NAMESPACE_BEGIN
MX_RENDER_API const Color3 
DEFAULT_SCREEN_COLOR_SRGB
 
MX_RENDER_API const Color3 DEFAULT_SCREEN_COLOR_LIN_REC709
 

User Interface Utilities

using UIPropertyGroup = std::multimap< string, UIPropertyItem >
 A grouping of property items by name. More...
 
MX_RENDER_API unsigned int getUIProperties (InputPtr input, const string &target, UIProperties &uiProperties)
 
MX_RENDER_API void createUIPropertyGroups (DocumentPtr doc, const VariableBlock &block, UIPropertyGroup &groups, UIPropertyGroup &unnamedGroups, const string &pathSeparator)
 

Detailed Description

Rendering utility methods

Definition in file Util.h.

Typedef Documentation

using UIPropertyGroup = std::multimap<string, UIPropertyItem>

A grouping of property items by name.

Definition at line 113 of file Util.h.

Function Documentation

MX_RENDER_API ShaderPtr createAlbedoTableShader ( GenContext context,
DocumentPtr  stdLib,
const string shaderName 
)

Create a shader that generates a look-up table for directional albedo, using the given standard libraries for code generation.

MX_RENDER_API ShaderPtr createBlurShader ( GenContext context,
DocumentPtr  stdLib,
const string shaderName,
const string filterType,
float  filterSize 
)

Create a blur shader, using the given standard libraries for code generation.

MX_RENDER_API ShaderPtr createConstantShader ( GenContext context,
DocumentPtr  stdLib,
const string shaderName,
const Color3 color 
)

Create a shader with a constant color output, using the given standard libraries for code generation.

MX_RENDER_API ShaderPtr createDepthShader ( GenContext context,
DocumentPtr  stdLib,
const string shaderName 
)

Create a shader with depth value output, using the given standard libraries for code generation.

MX_RENDER_API ShaderPtr createEnvPrefilterShader ( GenContext context,
DocumentPtr  stdLib,
const string shaderName 
)

Create a shader that generates a prefiltered environment map.

MX_RENDER_API ShaderPtr createShader ( const string shaderName,
GenContext context,
ElementPtr  elem 
)

Create a shader for a given element.

MX_RENDER_API void createUIPropertyGroups ( DocumentPtr  doc,
const VariableBlock block,
UIPropertyGroup groups,
UIPropertyGroup unnamedGroups,
const string pathSeparator 
)

Utility to group UI properties items based on Element group name from a VariableBlock. Returns a list of named and unnamed groups.

MX_RENDER_API unsigned int getUIProperties ( InputPtr  input,
const string target,
UIProperties uiProperties 
)

Get the UI properties for a given input element and target. Returns the number of properties found.

Variable Documentation

MX_RENDER_API const Color3 DEFAULT_SCREEN_COLOR_LIN_REC709
MATERIALX_NAMESPACE_BEGIN MX_RENDER_API const Color3 DEFAULT_SCREEN_COLOR_SRGB