MaterialX 1.38.2
GenOptions.h
Go to the documentation of this file.
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_GENOPTIONS_H
7#define MATERIALX_GENOPTIONS_H
8
11
13
14namespace MaterialX
15{
16
19{
26
32};
33
36{
39
43
47};
48
51{
54
57
60};
61
64class MX_GENSHADER_API GenOptions
65{
66 public:
67 GenOptions() :
68 shaderInterfaceType(SHADER_INTERFACE_COMPLETE),
69 fileTextureVerticalFlip(false),
70 addUpstreamDependencies(true),
71 hwTransparency(false),
72 hwSpecularEnvironmentMethod(SPECULAR_ENVIRONMENT_FIS),
73 hwDirectionalAlbedoMethod(DIRECTIONAL_ALBEDO_ANALYTIC),
74 hwWriteDepthMoments(false),
75 hwShadowMap(false),
76 hwAmbientOcclusion(false),
77 hwMaxActiveLightSources(3),
78 hwNormalizeUdimTexCoords(false),
79 hwWriteAlbedoTable(false)
80 {
81 }
82 virtual ~GenOptions() { }
83
84 // TODO: Add options for:
85 // - shader gen optimization level
86 // - graph flattening or not
87
90
96
101
106
110
117
121
125
129
133
137
141
148
152};
153
154} // namespace MaterialX
155
156#endif
HwDirectionalAlbedoMethod
Method to use for directional albedo evaluation.
Definition: GenOptions.h:51
@ DIRECTIONAL_ALBEDO_TABLE
Use a table look-up for directional albedo.
Definition: GenOptions.h:56
@ DIRECTIONAL_ALBEDO_MONTE_CARLO
Use Monte Carlo integration for directional albedo.
Definition: GenOptions.h:59
@ DIRECTIONAL_ALBEDO_ANALYTIC
Use an analytic approximation for directional albedo.
Definition: GenOptions.h:53
HwSpecularEnvironmentMethod
Method to use for specular environment lighting.
Definition: GenOptions.h:36
@ SPECULAR_ENVIRONMENT_NONE
Do not use specular environment maps.
Definition: GenOptions.h:38
@ SPECULAR_ENVIRONMENT_FIS
Use Filtered Importance Sampling for specular environment/indirect lighting.
Definition: GenOptions.h:42
@ SPECULAR_ENVIRONMENT_PREFILTER
Use pre-filtered environment maps for specular environment/indirect lighting.
Definition: GenOptions.h:46
ShaderInterfaceType
Type of shader interface to be generated.
Definition: GenOptions.h:19
@ SHADER_INTERFACE_REDUCED
Create a reduced interface with uniforms only for the inputs that has been declared in the shaders no...
Definition: GenOptions.h:31
@ SHADER_INTERFACE_COMPLETE
Create a complete interface with uniforms for all editable inputs on all nodes used by the shader.
Definition: GenOptions.h:25
Macros for declaring imported and exported symbols.
Class holding options to configure shader generation.
Definition: GenOptions.h:65
bool fileTextureVerticalFlip
If true the y-component of texture coordinates used for sampling file textures will be flipped before...
Definition: GenOptions.h:95
unsigned int hwMaxActiveLightSources
Sets the maximum number of light sources that can be active at once.
Definition: GenOptions.h:140
int shaderInterfaceType
Sets the type of shader interface to be generated.
Definition: GenOptions.h:89
bool hwAmbientOcclusion
Enables ambient occlusion rendering for HW shader targets.
Definition: GenOptions.h:136
bool hwShadowMap
Enables shadow mapping for HW shader targets.
Definition: GenOptions.h:132
string targetDistanceUnit
Define the target distance unit.
Definition: GenOptions.h:105
string targetColorSpaceOverride
An optional override for the target color space.
Definition: GenOptions.h:100
bool addUpstreamDependencies
Sets whether to include upstream dependencies for the element to generate a shader for.
Definition: GenOptions.h:109
HwSpecularEnvironmentMethod hwSpecularEnvironmentMethod
Sets the method to use for specular environment lighting for HW shader targets.
Definition: GenOptions.h:120
bool hwTransparency
Sets if transparency is needed or not for HW shaders.
Definition: GenOptions.h:116
HwDirectionalAlbedoMethod hwDirectionalAlbedoMethod
Sets the method to use for directional albedo evaluation for HW shader targets.
Definition: GenOptions.h:124
bool hwWriteDepthMoments
Enables the writing of depth moments for HW shader targets.
Definition: GenOptions.h:128
bool hwNormalizeUdimTexCoords
Sets whether to transform texture coordinates to normalize uv space when UDIMs images are bound to an...
Definition: GenOptions.h:147
bool hwWriteAlbedoTable
Enables the writing of a directional albedo table.
Definition: GenOptions.h:151