MaterialX 1.39.5
Loading...
Searching...
No Matches
GenOptions.h
Go to the documentation of this file.
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef MATERIALX_GENOPTIONS_H
7#define MATERIALX_GENOPTIONS_H
8
11
13
15
16MATERIALX_NAMESPACE_BEGIN
17
34
49
62
72
75class MX_GENSHADER_API GenOptions
76{
77 public:
78 GenOptions() :
82 libraryPrefix("libraries"),
87 hwTransparency(false),
92 hwSrgbEncodeOutput(false),
94 hwShadowMap(false),
95 hwAmbientOcclusion(false),
98 hwWriteAlbedoTable(false),
101 oslImplicitSurfaceShaderConversion(true),
102 oslConnectCiWrapper(false)
103 {
104 }
105 virtual ~GenOptions() { }
106
107 // TODO: Add options for:
108 // - shader gen optimization level
109 // - graph flattening or not
110
113
119
124
129
133
138
142
145
151
156
163
167
171
175
180
184
188
192
196
200
207
211
215
219
220 // Enables OSL conversion of surfaceshader struct to closure color.
221 // Defaults to true.
222 bool oslImplicitSurfaceShaderConversion;
223
224 // Enables an OSL node that adds the root's output to the Ci variable
225 // for OSL targets.
226 // Defaults to false.
227 bool oslConnectCiWrapper;
228};
229
230MATERIALX_NAMESPACE_END
231
232#endif
Cross-platform support for file and search paths.
HwDirectionalAlbedoMethod
Method to use for directional albedo evaluation.
Definition GenOptions.h:52
@ DIRECTIONAL_ALBEDO_TABLE
Use a table look-up for directional albedo.
Definition GenOptions.h:57
@ DIRECTIONAL_ALBEDO_MONTE_CARLO
Use Monte Carlo integration for directional albedo.
Definition GenOptions.h:60
@ DIRECTIONAL_ALBEDO_ANALYTIC
Use an analytic approximation for directional albedo.
Definition GenOptions.h:54
HwSpecularEnvironmentMethod
Method to use for specular environment lighting.
Definition GenOptions.h:37
@ SPECULAR_ENVIRONMENT_NONE
Do not use specular environment maps.
Definition GenOptions.h:39
@ SPECULAR_ENVIRONMENT_FIS
Use Filtered Importance Sampling for specular environment/indirect lighting.
Definition GenOptions.h:43
@ SPECULAR_ENVIRONMENT_PREFILTER
Use pre-filtered environment maps for specular environment/indirect lighting.
Definition GenOptions.h:47
HwTransmissionRenderMethod
Method to use for transmission rendering.
Definition GenOptions.h:65
@ TRANSMISSION_OPACITY
Use opacity for transmission rendering.
Definition GenOptions.h:70
@ TRANSMISSION_REFRACTION
Use a refraction approximation for transmission rendering.
Definition GenOptions.h:67
ShaderInterfaceType
Type of shader interface to be generated.
Definition GenOptions.h:20
@ SHADER_INTERFACE_REDUCED
Create a reduced interface with uniforms only for the inputs that has been declared in the shaders no...
Definition GenOptions.h:32
@ SHADER_INTERFACE_COMPLETE
Create a complete interface with uniforms for all editable inputs on all nodes used by the shader.
Definition GenOptions.h:26
Macros for declaring imported and exported symbols.
A generic file path, supporting both syntactic and file system operations.
Definition File.h:27
bool fileTextureVerticalFlip
If true the y-component of texture coordinates used for sampling file textures will be flipped before...
Definition GenOptions.h:118
unsigned int hwMaxActiveLightSources
Sets the maximum number of light sources that can be active at once.
Definition GenOptions.h:199
unsigned int hwAiryFresnelIterations
Sets the number of iterations for Airy Fresnel reflection calculations.
Definition GenOptions.h:179
bool emitColorTransforms
Enable emitting colorspace transform code if a color management system is defined.
Definition GenOptions.h:141
bool hwWriteEnvPrefilter
Enables the generation of a prefiltered environment map.
Definition GenOptions.h:214
bool hwAmbientOcclusion
Enables ambient occlusion rendering for HW shader targets.
Definition GenOptions.h:195
bool hwShadowMap
Enables shadow mapping for HW shader targets.
Definition GenOptions.h:191
bool hwSrgbEncodeOutput
Enables an sRGB encoding for the color output on HW shader targets.
Definition GenOptions.h:183
string targetDistanceUnit
Define the target distance unit.
Definition GenOptions.h:128
HwTransmissionRenderMethod hwTransmissionRenderMethod
Sets the method to use for transmission rendering for HW shader targets.
Definition GenOptions.h:174
bool elideConstantNodes
Enable eliding constant nodes. Defaults to true.
Definition GenOptions.h:144
string targetColorSpaceOverride
An optional override for the target color space.
Definition GenOptions.h:123
bool addUpstreamDependencies
Sets whether to include upstream dependencies for the element to generate a shader for.
Definition GenOptions.h:132
HwSpecularEnvironmentMethod hwSpecularEnvironmentMethod
Sets the method to use for specular environment lighting for HW shader targets.
Definition GenOptions.h:166
bool hwTransparency
Sets if transparency is needed or not for HW shaders.
Definition GenOptions.h:162
HwDirectionalAlbedoMethod hwDirectionalAlbedoMethod
Sets the method to use for directional albedo evaluation for HW shader targets.
Definition GenOptions.h:170
bool distributeLayerOverBsdfMix
Enable distributing layer operations over mix nodes.
Definition GenOptions.h:155
ShaderInterfaceType shaderInterfaceType
Sets the type of shader interface to be generated.
Definition GenOptions.h:112
bool hwImplicitBitangents
Calculate fallback bitangents from existing normals and tangents inside the bitangent node.
Definition GenOptions.h:218
bool hwWriteDepthMoments
Enables the writing of depth moments for HW shader targets.
Definition GenOptions.h:187
bool hwNormalizeUdimTexCoords
Sets whether to transform texture coordinates to normalize uv space when UDIMs images are bound to an...
Definition GenOptions.h:206
bool premultipliedBsdfAdd
Enable replacing BSDF mix nodes with premultiplied add nodes.
Definition GenOptions.h:150
FilePath libraryPrefix
The standard library prefix, which will be applied to calls to emitLibraryInclude during code generat...
Definition GenOptions.h:137
bool hwWriteAlbedoTable
Enables the writing of a directional albedo table.
Definition GenOptions.h:210