MaterialX 1.38.2
HwShaderGenerator.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_HWSHADERGENERATOR_H
7#define MATERIALX_HWSHADERGENERATOR_H
8
11
13
16
17namespace MaterialX
18{
19
20/*
21The HW shader generators have a number of predefined variables (inputs and uniforms) with binding rules.
22When these are used by a shader the application must bind them to the expected data. The following table is
23a listing of the variables with a description of what data they should be bound to.
24
25However, different renderers can have different requirements on naming conventions for these variables.
26In order to facilitate this the generators will use token substitution for naming the variables. The
27first colum below shows the token names that should be used in source code before the token substitution
28is done. The second row shows the real identifier names that will be used by default after substitution.
29An generator can override these identifier names in order to use a custom naming convention for these.
30Overriding identifier names is done by changing the entries in the identifiers map given to the function
31replaceIdentifiers(), which is handling the token substitution on a shader stage.
32
33----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
34 TOKEN NAME DEFAULT IDENTIFIER NAME TYPE BINDING
35----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
36
37Vertex input variables :
38 $inPosition i_position vec3 Vertex position in object space
39 $inNormal i_normal vec3 Vertex normal in object space
40 $inTangent i_tangent vec3 Vertex tangent in object space
41 $inBitangent i_bitangent vec3 Vertex bitangent in object space
42 $inTexcoord_N i_texcoord_N vec2 Vertex texture coordinate for the N:th uv set
43 $inColor_N i_color_N vec4 Vertex color for the N:th color set (RGBA)
44
45Uniform variables :
46 $worldMatrix u_worldMatrix mat4 World transformation
47 $worldInverseMatrix u_worldInverseMatrix mat4 World transformation, inverted
48 $worldTransposeMatrix u_worldTransposeMatrix mat4 World transformation, transposed
49 $worldInverseTransposeMatrix u_worldInverseTransposeMatrix mat4 World transformation, inverted and transposed
50 $viewMatrix u_viewMatrix mat4 View transformation
51 $viewInverseMatrix u_viewInverseMatrix mat4 View transformation, inverted
52 $viewTransposeMatrix u_viewTransposeMatrix mat4 View transformation, transposed
53 $viewInverseTransposeMatrix u_viewInverseTransposeMatrix mat4 View transformation, inverted and transposed
54 $projectionMatrix u_projectionMatrix mat4 Projection transformation
55 $projectionInverseMatrix u_projectionInverseMatrix mat4 Projection transformation, inverted
56 $projectionTransposeMatrix u_projectionTransposeMatrix mat4 Projection transformation, transposed
57 $projectionInverseTransposeMatrix u_projectionInverseTransposeMatrix mat4 Projection transformation, inverted and transposed
58 $worldViewMatrix u_worldViewMatrix mat4 World-view transformation
59 $viewProjectionMatrix u_viewProjectionMatrix mat4 View-projection transformation
60 $worldViewProjectionMatrix u_worldViewProjectionMatrix mat4 World-view-projection transformation
61 $viewPosition u_viewPosition vec3 World-space position of the view (camera)
62 $viewDirection u_viewDirection vec3 World-space direction of the view (camera)
63 $frame u_frame float The current frame number as defined by the host application
64 $time u_time float The current time in seconds
65 $geomprop_<name> u_geomprop_<name> <type> A named property of given <type> where <name> is the name of the variable on the geometry
66 $numActiveLightSources u_numActiveLightSources int The number of currently active light sources. Note that in shader this is clamped against
67 the maximum allowed number of lights sources. The maximum number is set by the generation
68 option GenOptions.hwMaxActiveLightSources.
69 $lightData[] u_lightData[] struct Array of struct LightData holding parameters for active light sources.
70 The LightData struct is built dynamically depending on requirements for
71 bound light shaders.
72 $envMatrix u_envMatrix mat4 Rotation matrix for the environment.
73 $envIrradiance u_envIrradiance sampler2D Sampler for the texture used for diffuse environment lighting.
74 $envRadiance u_envRadiance sampler2D Sampler for the texture used for specular environment lighting.
75 $envRadianceMips u_envRadianceMips int Number of mipmaps used on the specular environment texture.
76 $envRadianceSamples u_envRadianceSamples int Samples to use if Filtered Importance Sampling is used for specular environment lighting.
77
78----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
79----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
80*/
81
83namespace HW
84{
86 extern MX_GENSHADER_API const string T_IN_POSITION;
87 extern MX_GENSHADER_API const string T_IN_NORMAL;
88 extern MX_GENSHADER_API const string T_IN_TANGENT;
89 extern MX_GENSHADER_API const string T_IN_TEXCOORD;
90 extern MX_GENSHADER_API const string T_IN_GEOMPROP;
91 extern MX_GENSHADER_API const string T_IN_COLOR;
92 extern MX_GENSHADER_API const string T_POSITION_WORLD;
93 extern MX_GENSHADER_API const string T_NORMAL_WORLD;
94 extern MX_GENSHADER_API const string T_TANGENT_WORLD;
95 extern MX_GENSHADER_API const string T_BITANGENT_WORLD;
96 extern MX_GENSHADER_API const string T_POSITION_OBJECT;
97 extern MX_GENSHADER_API const string T_NORMAL_OBJECT;
98 extern MX_GENSHADER_API const string T_TANGENT_OBJECT;
99 extern MX_GENSHADER_API const string T_BITANGENT_OBJECT;
100 extern MX_GENSHADER_API const string T_TEXCOORD;
101 extern MX_GENSHADER_API const string T_COLOR;
102 extern MX_GENSHADER_API const string T_WORLD_MATRIX;
103 extern MX_GENSHADER_API const string T_WORLD_INVERSE_MATRIX;
104 extern MX_GENSHADER_API const string T_WORLD_TRANSPOSE_MATRIX;
105 extern MX_GENSHADER_API const string T_WORLD_INVERSE_TRANSPOSE_MATRIX;
106 extern MX_GENSHADER_API const string T_VIEW_MATRIX;
107 extern MX_GENSHADER_API const string T_VIEW_INVERSE_MATRIX;
108 extern MX_GENSHADER_API const string T_VIEW_TRANSPOSE_MATRIX;
109 extern MX_GENSHADER_API const string T_VIEW_INVERSE_TRANSPOSE_MATRIX;
110 extern MX_GENSHADER_API const string T_PROJ_MATRIX;
111 extern MX_GENSHADER_API const string T_PROJ_INVERSE_MATRIX;
112 extern MX_GENSHADER_API const string T_PROJ_TRANSPOSE_MATRIX;
113 extern MX_GENSHADER_API const string T_PROJ_INVERSE_TRANSPOSE_MATRIX;
114 extern MX_GENSHADER_API const string T_WORLD_VIEW_MATRIX;
115 extern MX_GENSHADER_API const string T_VIEW_PROJECTION_MATRIX;
116 extern MX_GENSHADER_API const string T_WORLD_VIEW_PROJECTION_MATRIX;
117 extern MX_GENSHADER_API const string T_VIEW_POSITION;
118 extern MX_GENSHADER_API const string T_VIEW_DIRECTION;
119 extern MX_GENSHADER_API const string T_FRAME;
120 extern MX_GENSHADER_API const string T_TIME;
121 extern MX_GENSHADER_API const string T_GEOMPROP;
122 extern MX_GENSHADER_API const string T_ALPHA_THRESHOLD;
123 extern MX_GENSHADER_API const string T_NUM_ACTIVE_LIGHT_SOURCES;
124 extern MX_GENSHADER_API const string T_ENV_MATRIX;
125 extern MX_GENSHADER_API const string T_ENV_RADIANCE;
126 extern MX_GENSHADER_API const string T_ENV_RADIANCE_MIPS;
127 extern MX_GENSHADER_API const string T_ENV_RADIANCE_SAMPLES;
128 extern MX_GENSHADER_API const string T_ENV_IRRADIANCE;
129 extern MX_GENSHADER_API const string T_ALBEDO_TABLE;
130 extern MX_GENSHADER_API const string T_ALBEDO_TABLE_SIZE;
131 extern MX_GENSHADER_API const string T_AMB_OCC_MAP;
132 extern MX_GENSHADER_API const string T_AMB_OCC_GAIN;
133 extern MX_GENSHADER_API const string T_SHADOW_MAP;
134 extern MX_GENSHADER_API const string T_SHADOW_MATRIX;
135 extern MX_GENSHADER_API const string T_VERTEX_DATA_INSTANCE;
136 extern MX_GENSHADER_API const string T_LIGHT_DATA_INSTANCE;
137
140 extern MX_GENSHADER_API const string IN_POSITION;
141 extern MX_GENSHADER_API const string IN_NORMAL;
142 extern MX_GENSHADER_API const string IN_TANGENT;
143 extern MX_GENSHADER_API const string IN_TEXCOORD;
144 extern MX_GENSHADER_API const string IN_GEOMPROP;
145 extern MX_GENSHADER_API const string IN_COLOR;
146 extern MX_GENSHADER_API const string POSITION_WORLD;
147 extern MX_GENSHADER_API const string NORMAL_WORLD;
148 extern MX_GENSHADER_API const string TANGENT_WORLD;
149 extern MX_GENSHADER_API const string BITANGENT_WORLD;
150 extern MX_GENSHADER_API const string POSITION_OBJECT;
151 extern MX_GENSHADER_API const string NORMAL_OBJECT;
152 extern MX_GENSHADER_API const string TANGENT_OBJECT;
153 extern MX_GENSHADER_API const string BITANGENT_OBJECT;
154 extern MX_GENSHADER_API const string TEXCOORD;
155 extern MX_GENSHADER_API const string COLOR;
156 extern MX_GENSHADER_API const string WORLD_MATRIX;
157 extern MX_GENSHADER_API const string WORLD_INVERSE_MATRIX;
158 extern MX_GENSHADER_API const string WORLD_TRANSPOSE_MATRIX;
159 extern MX_GENSHADER_API const string WORLD_INVERSE_TRANSPOSE_MATRIX;
160 extern MX_GENSHADER_API const string VIEW_MATRIX;
161 extern MX_GENSHADER_API const string VIEW_INVERSE_MATRIX;
162 extern MX_GENSHADER_API const string VIEW_TRANSPOSE_MATRIX;
163 extern MX_GENSHADER_API const string VIEW_INVERSE_TRANSPOSE_MATRIX;
164 extern MX_GENSHADER_API const string PROJ_MATRIX;
165 extern MX_GENSHADER_API const string PROJ_INVERSE_MATRIX;
166 extern MX_GENSHADER_API const string PROJ_TRANSPOSE_MATRIX;
167 extern MX_GENSHADER_API const string PROJ_INVERSE_TRANSPOSE_MATRIX;
168 extern MX_GENSHADER_API const string WORLD_VIEW_MATRIX;
169 extern MX_GENSHADER_API const string VIEW_PROJECTION_MATRIX;
170 extern MX_GENSHADER_API const string WORLD_VIEW_PROJECTION_MATRIX;
171 extern MX_GENSHADER_API const string VIEW_POSITION;
172 extern MX_GENSHADER_API const string VIEW_DIRECTION;
173 extern MX_GENSHADER_API const string FRAME;
174 extern MX_GENSHADER_API const string TIME;
175 extern MX_GENSHADER_API const string GEOMPROP;
176 extern MX_GENSHADER_API const string ALPHA_THRESHOLD;
177 extern MX_GENSHADER_API const string NUM_ACTIVE_LIGHT_SOURCES;
178 extern MX_GENSHADER_API const string ENV_MATRIX;
179 extern MX_GENSHADER_API const string ENV_RADIANCE;
180 extern MX_GENSHADER_API const string ENV_RADIANCE_MIPS;
181 extern MX_GENSHADER_API const string ENV_RADIANCE_SAMPLES;
182 extern MX_GENSHADER_API const string ENV_IRRADIANCE;
183 extern MX_GENSHADER_API const string ALBEDO_TABLE;
184 extern MX_GENSHADER_API const string ALBEDO_TABLE_SIZE;
185 extern MX_GENSHADER_API const string AMB_OCC_MAP;
186 extern MX_GENSHADER_API const string AMB_OCC_GAIN;
187 extern MX_GENSHADER_API const string SHADOW_MAP;
188 extern MX_GENSHADER_API const string SHADOW_MATRIX;
189 extern MX_GENSHADER_API const string VERTEX_DATA_INSTANCE;
190 extern MX_GENSHADER_API const string LIGHT_DATA_INSTANCE;
191 extern MX_GENSHADER_API const string LIGHT_DATA_MAX_LIGHT_SOURCES;
192
194 extern MX_GENSHADER_API const string VERTEX_INPUTS; // Geometric inputs for vertex stage.
195 extern MX_GENSHADER_API const string VERTEX_DATA; // Connector block for data transfer from vertex stage to pixel stage.
196 extern MX_GENSHADER_API const string PRIVATE_UNIFORMS; // Uniform inputs set privately by application.
197 extern MX_GENSHADER_API const string PUBLIC_UNIFORMS; // Uniform inputs visible in UI and set by user.
198 extern MX_GENSHADER_API const string LIGHT_DATA; // Uniform inputs for light sources.
199 extern MX_GENSHADER_API const string PIXEL_OUTPUTS; // Outputs from the main/pixel stage.
200
202 extern MX_GENSHADER_API const string DIR_N;
203 extern MX_GENSHADER_API const string DIR_L;
204 extern MX_GENSHADER_API const string DIR_V;
205 extern MX_GENSHADER_API const string WORLD_POSITION;
206 extern MX_GENSHADER_API const string OCCLUSION;
207
209 extern MX_GENSHADER_API const string ATTR_TRANSPARENT;
210
212 extern MX_GENSHADER_API const string USER_DATA_CLOSURE_CONTEXT;
213 extern MX_GENSHADER_API const string USER_DATA_LIGHT_SHADERS;
214 extern MX_GENSHADER_API const string USER_DATA_BINDING_CONTEXT;
215}
216
217namespace Stage
218{
220 extern MX_GENSHADER_API const string VERTEX;
221}
222
223class HwClosureContext;
224class HwLightShaders;
225class HwShaderGenerator;
226class HwResourceBindingContext;
227
229using HwClosureContextPtr = shared_ptr<class HwClosureContext>;
231using HwLightShadersPtr = shared_ptr<class HwLightShaders>;
233using HwShaderGeneratorPtr = shared_ptr<class HwShaderGenerator>;
235using HwResourceBindingContextPtr = shared_ptr<class HwResourceBindingContext>;
236
242class MX_GENSHADER_API HwClosureContext : public GenUserData
243{
244 public:
246 enum Type
247 {
248 REFLECTION,
249 TRANSMISSION,
250 INDIRECT,
251 EMISSION
252 };
253
257 using Argument = std::pair<const TypeDesc*, string>;
259 using Arguments = vector<Argument>;
260
262 HwClosureContext(int type) : _type(type) {}
263
266 {
267 return std::make_shared<HwClosureContext>(type);
268 }
269
271 int getType() const { return _type; }
272
274 void addArgument(const TypeDesc* nodeType, const Argument& arg)
275 {
276 _arguments[nodeType].push_back(arg);
277 }
278
280 const Arguments& getArguments(const TypeDesc* nodeType) const
281 {
282 auto it = _arguments.find(nodeType);
283 return it != _arguments.end() ? it->second : EMPTY_ARGUMENTS;
284 }
285
287 void setSuffix(const TypeDesc* nodeType, const string& suffix)
288 {
289 _suffix[nodeType] = suffix;
290 }
291
293 const string& getSuffix(const TypeDesc* nodeType) const
294 {
295 auto it = _suffix.find(nodeType);
296 return it != _suffix.end() ? it->second : EMPTY_STRING;
297 }
298
299 protected:
300 const int _type;
301 std::unordered_map<const TypeDesc*, Arguments> _arguments;
302 std::unordered_map<const TypeDesc*, string> _suffix;
303 static const Arguments EMPTY_ARGUMENTS;
304};
305
308class MX_GENSHADER_API HwLightShaders : public GenUserData
309{
310 public:
313 {
314 return std::make_shared<HwLightShaders>();
315 }
316
318 void bind(unsigned int type, ShaderNodePtr shader)
319 {
320 _shaders[type] = shader;
321 }
322
324 void unbind(unsigned int type)
325 {
326 _shaders.erase(type);
327 }
328
330 void clear()
331 {
332 _shaders.clear();
333 }
334
337 const ShaderNode* get(unsigned int type) const
338 {
339 auto it = _shaders.find(type);
340 return it != _shaders.end() ? it->second.get() : nullptr;
341 }
342
344 const std::unordered_map<unsigned int, ShaderNodePtr>& get() const
345 {
346 return _shaders;
347 }
348
349 protected:
350 std::unordered_map<unsigned int, ShaderNodePtr> _shaders;
351};
352
355class MX_GENSHADER_API HwShaderGenerator : public ShaderGenerator
356{
357 public:
359 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage,
360 bool checkScope = true) const override;
361
363 virtual void emitTextureNodes(const ShaderGraph& graph, GenContext& context, ShaderStage& stage) const;
364
368 virtual void emitBsdfNodes(const ShaderGraph& graph, const ShaderNode& shaderNode, HwClosureContextPtr ccx,
369 GenContext& context, ShaderStage& stage, string& bsdf) const;
370
374 virtual void emitEdfNodes(const ShaderGraph& graph, const ShaderNode& shaderNode, HwClosureContextPtr ccx,
375 GenContext& context, ShaderStage& stage, string& edf) const;
376
378 virtual void addStageLightingUniforms(GenContext& context, ShaderStage& stage) const;
379
381 void getNodeClosureContexts(const ShaderNode& node, vector<HwClosureContextPtr>& ccx) const;
382
387 static void bindLightShader(const NodeDef& nodeDef, unsigned int lightTypeId, GenContext& context);
388
390 static void unbindLightShader(unsigned int lightTypeId, GenContext& context);
391
393 static void unbindLightShaders(GenContext& context);
394
397 static const string CLOSURE_CONTEXT_SUFFIX_TRANSMISSIION;
398 static const string CLOSURE_CONTEXT_SUFFIX_INDIRECT;
399
400 protected:
402
404 virtual ShaderPtr createShader(const string& name, ElementPtr element, GenContext& context) const;
405
407 ShaderNodeImplPtr createSourceCodeImplementation(const Implementation& impl) const override;
408
410 ShaderNodeImplPtr createCompoundImplementation(const NodeGraph& impl) const override;
411
414 HwClosureContextPtr _defTransmission;
415 HwClosureContextPtr _defIndirect;
416 HwClosureContextPtr _defEmission;
417};
418
421class MX_GENSHADER_API HwResourceBindingContext : public GenUserData
422{
423 public:
424 virtual ~HwResourceBindingContext() {}
425
426 // Initialize the context before generation starts.
427 virtual void initialize() = 0;
428
429 // Emit directives required for binding support
430 virtual void emitDirectives(GenContext& context, ShaderStage& stage) = 0;
431
432 // Emit uniforms with binding information
433 virtual void emitResourceBindings(GenContext& context, const VariableBlock& uniforms, ShaderStage& stage) = 0;
434
435 // Emit struct uniforms with binding information
436 virtual void emitStructuredResourceBindings(GenContext& context, const VariableBlock& uniforms,
437 ShaderStage& stage, const std::string& structInstanceName,
438 const std::string& arraySuffix = EMPTY_STRING) = 0;
439
440};
441
442} // namespace MaterialX
443
444#endif
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
Definition: Element.h:31
Context classes for shader generation.
shared_ptr< class HwShaderGenerator > HwShaderGeneratorPtr
Shared pointer to a HwShaderGenerator.
Definition: HwShaderGenerator.h:233
shared_ptr< class HwClosureContext > HwClosureContextPtr
Shared pointer to a HwClosureContext.
Definition: HwShaderGenerator.h:229
shared_ptr< class HwResourceBindingContext > HwResourceBindingContextPtr
Shared pointer to a HwResourceBindingContext.
Definition: HwShaderGenerator.h:235
shared_ptr< class HwLightShaders > HwLightShadersPtr
Shared pointer to a HwLightShaders.
Definition: HwShaderGenerator.h:231
Macros for declaring imported and exported symbols.
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
Definition: Library.h:34
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
Base shader generator class.
shared_ptr< class ShaderNode > ShaderNodePtr
Shared pointer to a ShaderNode.
Definition: ShaderNode.h:36
shared_ptr< Syntax > SyntaxPtr
Shared pointer to a Syntax.
Definition: Syntax.h:26
A context class for shader generation.
Definition: GenContext.h:27
Base class for custom user data needed during shader generation.
Definition: GenUserData.h:28
Class representing a context for closure evaluation on hardware targets.
Definition: HwShaderGenerator.h:243
static HwClosureContextPtr create(int type)
Create and return a new instance.
Definition: HwShaderGenerator.h:265
Type
Types of closure contexts.
Definition: HwShaderGenerator.h:247
const string & getSuffix(const TypeDesc *nodeType) const
Return the function name suffix to be used for the given node in this context.
Definition: HwShaderGenerator.h:293
vector< Argument > Arguments
An array of arguments.
Definition: HwShaderGenerator.h:259
HwClosureContext(int type)
Constructor.
Definition: HwShaderGenerator.h:262
void setSuffix(const TypeDesc *nodeType, const string &suffix)
For the given node type set a function name suffix to be used for the function in this context.
Definition: HwShaderGenerator.h:287
void addArgument(const TypeDesc *nodeType, const Argument &arg)
For the given node type add an extra argument to be used for the function in this context.
Definition: HwShaderGenerator.h:274
std::pair< const TypeDesc *, string > Argument
An extra argument for closure functions.
Definition: HwShaderGenerator.h:257
const Arguments & getArguments(const TypeDesc *nodeType) const
Return a list of extra argument to be used for the given node in this context.
Definition: HwShaderGenerator.h:280
int getType() const
Return the identifier for this context.
Definition: HwShaderGenerator.h:271
Hardware light shader user data.
Definition: HwShaderGenerator.h:309
void bind(unsigned int type, ShaderNodePtr shader)
Bind a light shader to a light type id.
Definition: HwShaderGenerator.h:318
const ShaderNode * get(unsigned int type) const
Return the light shader bound to the given light type, or nullptr if not light shader is bound to thi...
Definition: HwShaderGenerator.h:337
const std::unordered_map< unsigned int, ShaderNodePtr > & get() const
Return the map of bound light shaders.
Definition: HwShaderGenerator.h:344
static HwLightShadersPtr create()
Create and return a new instance.
Definition: HwShaderGenerator.h:312
void clear()
Clear all light shaders previously bound.
Definition: HwShaderGenerator.h:330
void unbind(unsigned int type)
Unbind a light shader previously bound to a light type id.
Definition: HwShaderGenerator.h:324
Class representing a context for resource binding for hardware resources.
Definition: HwShaderGenerator.h:422
Base class for shader generators targeting HW rendering.
Definition: HwShaderGenerator.h:356
static const string CLOSURE_CONTEXT_SUFFIX_REFLECTION
String constants for closure context suffixes.
Definition: HwShaderGenerator.h:396
HwClosureContextPtr _defReflection
Closure contexts for defining closure functions.
Definition: HwShaderGenerator.h:413
An implementation element within a Document.
Definition: Definition.h:194
A node definition element within a Document.
Definition: Definition.h:83
A node graph element within a Document.
Definition: Node.h:316
Base class for shader generators All third-party shader generators should derive from this class.
Definition: ShaderGenerator.h:30
Class representing a graph (DAG) for shader generation.
Definition: ShaderGraph.h:45
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:326
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:124
A type descriptor for MaterialX data types.
Definition: TypeDesc.h:29
A block of variables in a shader stage.
Definition: ShaderStage.h:53
const string IN_POSITION
Default names for identifiers.
Definition: HwShaderGenerator.cpp:73
const string T_IN_POSITION
Token identifiers.
Definition: HwShaderGenerator.cpp:21
const string ATTR_TRANSPARENT
Attribute names.
Definition: HwShaderGenerator.cpp:137
const string VERTEX_INPUTS
Variable blocks names.
Definition: HwShaderGenerator.cpp:126
const string DIR_N
Variable names for lighting parameters.
Definition: HwShaderGenerator.cpp:132
const string USER_DATA_CLOSURE_CONTEXT
User data names.
Definition: HwShaderGenerator.cpp:138