HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GenOptions Class Reference

#include <GenOptions.h>

Public Member Functions

 GenOptions ()
 
virtual ~GenOptions ()
 

Public Attributes

ShaderInterfaceType shaderInterfaceType
 Sets the type of shader interface to be generated. More...
 
bool fileTextureVerticalFlip
 
string targetColorSpaceOverride
 
string targetDistanceUnit
 
bool addUpstreamDependencies
 
FilePath libraryPrefix
 
bool emitColorTransforms
 
bool elideConstantNodes
 Enable eliding constant nodes. Defaults to true. More...
 
bool premultipliedBsdfAdd
 
bool distributeLayerOverBsdfMix
 
bool hwTransparency
 
HwSpecularEnvironmentMethod hwSpecularEnvironmentMethod
 
HwDirectionalAlbedoMethod hwDirectionalAlbedoMethod
 
HwTransmissionRenderMethod hwTransmissionRenderMethod
 
unsigned int hwAiryFresnelIterations
 
bool hwSrgbEncodeOutput
 
bool hwWriteDepthMoments
 
bool hwShadowMap
 
bool hwAmbientOcclusion
 
unsigned int hwMaxActiveLightSources
 
bool hwNormalizeUdimTexCoords
 
bool hwWriteAlbedoTable
 
bool hwWriteEnvPrefilter
 
bool hwImplicitBitangents
 
bool oslImplicitSurfaceShaderConversion
 
bool oslConnectCiWrapper
 

Detailed Description

Class holding options to configure shader generation.

Definition at line 75 of file GenOptions.h.

Constructor & Destructor Documentation

GenOptions::GenOptions ( )
inline

Definition at line 78 of file GenOptions.h.

virtual GenOptions::~GenOptions ( )
inlinevirtual

Definition at line 105 of file GenOptions.h.

Member Data Documentation

bool GenOptions::addUpstreamDependencies

Sets whether to include upstream dependencies for the element to generate a shader for.

Definition at line 132 of file GenOptions.h.

bool GenOptions::distributeLayerOverBsdfMix

Enable distributing layer operations over mix nodes. Transforms layer(mix(A, B, w), C) into mix(layer(A, C), layer(B, C), w) for backends with limited layering capabilities. Defaults to false.

Definition at line 155 of file GenOptions.h.

bool GenOptions::elideConstantNodes

Enable eliding constant nodes. Defaults to true.

Definition at line 144 of file GenOptions.h.

bool GenOptions::emitColorTransforms

Enable emitting colorspace transform code if a color management system is defined. Defaults to true.

Definition at line 141 of file GenOptions.h.

bool GenOptions::fileTextureVerticalFlip

If true the y-component of texture coordinates used for sampling file textures will be flipped before sampling. This can be used if file textures need to be flipped vertically to match the target's texture space convention. By default this option is false.

Definition at line 118 of file GenOptions.h.

unsigned int GenOptions::hwAiryFresnelIterations

Sets the number of iterations for Airy Fresnel reflection calculations. Higher values provide more accurate thin-film interference patterns but increase computational cost. Defaults to 2.

Definition at line 179 of file GenOptions.h.

bool GenOptions::hwAmbientOcclusion

Enables ambient occlusion rendering for HW shader targets. Defaults to false.

Definition at line 195 of file GenOptions.h.

HwDirectionalAlbedoMethod GenOptions::hwDirectionalAlbedoMethod

Sets the method to use for directional albedo evaluation for HW shader targets.

Definition at line 170 of file GenOptions.h.

bool GenOptions::hwImplicitBitangents

Calculate fallback bitangents from existing normals and tangents inside the bitangent node.

Definition at line 218 of file GenOptions.h.

unsigned int GenOptions::hwMaxActiveLightSources

Sets the maximum number of light sources that can be active at once.

Definition at line 199 of file GenOptions.h.

bool GenOptions::hwNormalizeUdimTexCoords

Sets whether to transform texture coordinates to normalize uv space when UDIMs images are bound to an image. Can be enabled for when texture atlas generation is performed to compress a set of UDIMs into a single normalized image for hardware rendering.

Definition at line 206 of file GenOptions.h.

bool GenOptions::hwShadowMap

Enables shadow mapping for HW shader targets. Defaults to false.

Definition at line 191 of file GenOptions.h.

HwSpecularEnvironmentMethod GenOptions::hwSpecularEnvironmentMethod

Sets the method to use for specular environment lighting for HW shader targets.

Definition at line 166 of file GenOptions.h.

bool GenOptions::hwSrgbEncodeOutput

Enables an sRGB encoding for the color output on HW shader targets. Defaults to false.

Definition at line 183 of file GenOptions.h.

HwTransmissionRenderMethod GenOptions::hwTransmissionRenderMethod

Sets the method to use for transmission rendering for HW shader targets.

Definition at line 174 of file GenOptions.h.

bool GenOptions::hwTransparency

Sets if transparency is needed or not for HW shaders. If a surface shader has potential of being transparent this must be set to true, otherwise no transparency code fragments will be generated for the shader and the surface will be fully opaque.

Definition at line 162 of file GenOptions.h.

bool GenOptions::hwWriteAlbedoTable

Enables the writing of a directional albedo table. Defaults to false.

Definition at line 210 of file GenOptions.h.

bool GenOptions::hwWriteDepthMoments

Enables the writing of depth moments for HW shader targets. Defaults to false.

Definition at line 187 of file GenOptions.h.

bool GenOptions::hwWriteEnvPrefilter

Enables the generation of a prefiltered environment map. Defaults to false.

Definition at line 214 of file GenOptions.h.

FilePath GenOptions::libraryPrefix

The standard library prefix, which will be applied to calls to emitLibraryInclude during code generation. Defaults to "libraries".

Definition at line 137 of file GenOptions.h.

bool GenOptions::oslConnectCiWrapper

Definition at line 227 of file GenOptions.h.

bool GenOptions::oslImplicitSurfaceShaderConversion

Definition at line 222 of file GenOptions.h.

bool GenOptions::premultipliedBsdfAdd

Enable replacing BSDF mix nodes with premultiplied add nodes. This folds the mix weight into each BSDF's weight input, enabling hardware shading languages to skip BSDF evaluation via dynamic branching when the weight is zero. Defaults to false.

Definition at line 150 of file GenOptions.h.

ShaderInterfaceType GenOptions::shaderInterfaceType

Sets the type of shader interface to be generated.

Definition at line 112 of file GenOptions.h.

string GenOptions::targetColorSpaceOverride

An optional override for the target color space. Shader fragments will be generated to transform input values and textures into this color space.

Definition at line 123 of file GenOptions.h.

string GenOptions::targetDistanceUnit

Define the target distance unit. Shader fragments will be generated to transform input distance values to the given unit.

Definition at line 128 of file GenOptions.h.


The documentation for this class was generated from the following file: