MaterialX 1.39.4
Loading...
Searching...
No Matches
HwShaderGenerator.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_HWSHADERGENERATOR_H
7#define MATERIALX_HWSHADERGENERATOR_H
8
11
13
16
17MATERIALX_NAMESPACE_BEGIN
18
19/*
20The HW shader generators have a number of predefined variables (inputs and uniforms) with binding rules.
21When these are used by a shader the application must bind them to the expected data. The following table is
22a listing of the variables with a description of what data they should be bound to.
23
24However, different renderers can have different requirements on naming conventions for these variables.
25In order to facilitate this the generators will use token substitution for naming the variables. The
26first column below shows the token names that should be used in source code before the token substitution
27is done. The second row shows the real identifier names that will be used by default after substitution.
28An generator can override these identifier names in order to use a custom naming convention for these.
29Overriding identifier names is done by changing the entries in the identifiers map given to the function
30replaceIdentifiers(), which is handling the token substitution on a shader stage.
31
32----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
33 TOKEN NAME DEFAULT IDENTIFIER NAME TYPE BINDING
34----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
35
36Vertex input variables :
37 $inPosition i_position vec3 Vertex position in object space
38 $inNormal i_normal vec3 Vertex normal in object space
39 $inTangent i_tangent vec3 Vertex tangent in object space
40 $inBitangent i_bitangent vec3 Vertex bitangent in object space
41 $inTexcoord_N i_texcoord_N vec2 Vertex texture coordinate for the N:th uv set
42 $inColor_N i_color_N vec4 Vertex color for the N:th color set (RGBA)
43
44Uniform variables :
45 $worldMatrix u_worldMatrix mat4 World transformation
46 $worldInverseMatrix u_worldInverseMatrix mat4 World transformation, inverted
47 $worldTransposeMatrix u_worldTransposeMatrix mat4 World transformation, transposed
48 $worldInverseTransposeMatrix u_worldInverseTransposeMatrix mat4 World transformation, inverted and transposed
49 $viewMatrix u_viewMatrix mat4 View transformation
50 $viewInverseMatrix u_viewInverseMatrix mat4 View transformation, inverted
51 $viewTransposeMatrix u_viewTransposeMatrix mat4 View transformation, transposed
52 $viewInverseTransposeMatrix u_viewInverseTransposeMatrix mat4 View transformation, inverted and transposed
53 $projectionMatrix u_projectionMatrix mat4 Projection transformation
54 $projectionInverseMatrix u_projectionInverseMatrix mat4 Projection transformation, inverted
55 $projectionTransposeMatrix u_projectionTransposeMatrix mat4 Projection transformation, transposed
56 $projectionInverseTransposeMatrix u_projectionInverseTransposeMatrix mat4 Projection transformation, inverted and transposed
57 $worldViewMatrix u_worldViewMatrix mat4 World-view transformation
58 $viewProjectionMatrix u_viewProjectionMatrix mat4 View-projection transformation
59 $worldViewProjectionMatrix u_worldViewProjectionMatrix mat4 World-view-projection transformation
60 $viewPosition u_viewPosition vec3 World-space position of the view (camera)
61 $viewDirection u_viewDirection vec3 World-space direction of the view (camera)
62 $frame u_frame float The current frame number as defined by the host application
63 $time u_time float The current time in seconds
64 $geomprop_<name> u_geomprop_<name> <type> A named property of given <type> where <name> is the name of the variable on the geometry
65 $numActiveLightSources u_numActiveLightSources int The number of currently active light sources. Note that in shader this is clamped against
66 the maximum allowed number of lights sources. The maximum number is set by the generation
67 option GenOptions.hwMaxActiveLightSources.
68 $lightData[] u_lightData[] struct Array of struct LightData holding parameters for active light sources.
69 The LightData struct is built dynamically depending on requirements for
70 bound light shaders.
71 $envMatrix u_envMatrix mat4 Rotation matrix for the environment.
72 $envIrradiance u_envIrradiance sampler2D Sampler for the texture used for diffuse environment lighting.
73 $envIrradianceSampler2D u_envIrradiance sampler2D For split texture and sampler, takes form of sampler2D(tex, sampler)
74 $envRadiance u_envRadiance sampler2D Sampler for the texture used for specular environment lighting.
75 $envRadianceSampler2D u_envRadiance sampler2D For split texture and sampler, takes form of sampler2D(tex, sampler)
76 $envLightIntensity u_envLightIntensity float Linear multiplier for environment lighting
77 $envRadianceMips u_envRadianceMips int Number of mipmaps used on the specular environment texture.
78 $envRadianceSamples u_envRadianceSamples int Samples to use if Filtered Importance Sampling is used for specular environment lighting.
79 $texSamplerSampler2D tex_sampler sampler2D Texture sampler2D parameter. For split texture and sampler, calls sampler2D(tex_texture, tex_sampler).
80 $texSamplerSignature sampler2D tex_sampler signature For function signature declaration.
81
82----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
83----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
84*/
85
87namespace HW
88{
90extern MX_GENSHADER_API const string T_IN_POSITION;
91extern MX_GENSHADER_API const string T_IN_NORMAL;
92extern MX_GENSHADER_API const string T_IN_TANGENT;
93extern MX_GENSHADER_API const string T_IN_BITANGENT;
94extern MX_GENSHADER_API const string T_IN_TEXCOORD;
95extern MX_GENSHADER_API const string T_IN_GEOMPROP;
96extern MX_GENSHADER_API const string T_IN_COLOR;
97extern MX_GENSHADER_API const string T_POSITION_WORLD;
98extern MX_GENSHADER_API const string T_NORMAL_WORLD;
99extern MX_GENSHADER_API const string T_TANGENT_WORLD;
100extern MX_GENSHADER_API const string T_BITANGENT_WORLD;
101extern MX_GENSHADER_API const string T_POSITION_OBJECT;
102extern MX_GENSHADER_API const string T_NORMAL_OBJECT;
103extern MX_GENSHADER_API const string T_TANGENT_OBJECT;
104extern MX_GENSHADER_API const string T_BITANGENT_OBJECT;
105extern MX_GENSHADER_API const string T_TEXCOORD;
106extern MX_GENSHADER_API const string T_COLOR;
107extern MX_GENSHADER_API const string T_WORLD_MATRIX;
108extern MX_GENSHADER_API const string T_WORLD_INVERSE_MATRIX;
109extern MX_GENSHADER_API const string T_WORLD_TRANSPOSE_MATRIX;
110extern MX_GENSHADER_API const string T_WORLD_INVERSE_TRANSPOSE_MATRIX;
111extern MX_GENSHADER_API const string T_VIEW_MATRIX;
112extern MX_GENSHADER_API const string T_VIEW_INVERSE_MATRIX;
113extern MX_GENSHADER_API const string T_VIEW_TRANSPOSE_MATRIX;
114extern MX_GENSHADER_API const string T_VIEW_INVERSE_TRANSPOSE_MATRIX;
115extern MX_GENSHADER_API const string T_PROJ_MATRIX;
116extern MX_GENSHADER_API const string T_PROJ_INVERSE_MATRIX;
117extern MX_GENSHADER_API const string T_PROJ_TRANSPOSE_MATRIX;
118extern MX_GENSHADER_API const string T_PROJ_INVERSE_TRANSPOSE_MATRIX;
119extern MX_GENSHADER_API const string T_WORLD_VIEW_MATRIX;
120extern MX_GENSHADER_API const string T_VIEW_PROJECTION_MATRIX;
121extern MX_GENSHADER_API const string T_WORLD_VIEW_PROJECTION_MATRIX;
122extern MX_GENSHADER_API const string T_VIEW_POSITION;
123extern MX_GENSHADER_API const string T_VIEW_DIRECTION;
124extern MX_GENSHADER_API const string T_FRAME;
125extern MX_GENSHADER_API const string T_TIME;
126extern MX_GENSHADER_API const string T_GEOMPROP;
127extern MX_GENSHADER_API const string T_ALPHA_THRESHOLD;
128extern MX_GENSHADER_API const string T_NUM_ACTIVE_LIGHT_SOURCES;
129extern MX_GENSHADER_API const string T_ENV_MATRIX;
130extern MX_GENSHADER_API const string T_ENV_RADIANCE;
131extern MX_GENSHADER_API const string T_ENV_RADIANCE_SAMPLER2D;
132extern MX_GENSHADER_API const string T_ENV_RADIANCE_MIPS;
133extern MX_GENSHADER_API const string T_ENV_RADIANCE_SAMPLES;
134extern MX_GENSHADER_API const string T_ENV_IRRADIANCE;
135extern MX_GENSHADER_API const string T_ENV_IRRADIANCE_SAMPLER2D;
136extern MX_GENSHADER_API const string T_ENV_LIGHT_INTENSITY;
137extern MX_GENSHADER_API const string T_ENV_PREFILTER_MIP;
138extern MX_GENSHADER_API const string T_REFRACTION_TWO_SIDED;
139extern MX_GENSHADER_API const string T_ALBEDO_TABLE;
140extern MX_GENSHADER_API const string T_ALBEDO_TABLE_SIZE;
141extern MX_GENSHADER_API const string T_AMB_OCC_MAP;
142extern MX_GENSHADER_API const string T_AMB_OCC_GAIN;
143extern MX_GENSHADER_API const string T_SHADOW_MAP;
144extern MX_GENSHADER_API const string T_SHADOW_MATRIX;
145extern MX_GENSHADER_API const string T_VERTEX_DATA_INSTANCE;
146extern MX_GENSHADER_API const string T_LIGHT_DATA_INSTANCE;
147extern MX_GENSHADER_API const string T_TEX_SAMPLER_SAMPLER2D;
148extern MX_GENSHADER_API const string T_TEX_SAMPLER_SIGNATURE;
149
152extern MX_GENSHADER_API const string IN_POSITION;
153extern MX_GENSHADER_API const string IN_NORMAL;
154extern MX_GENSHADER_API const string IN_TANGENT;
155extern MX_GENSHADER_API const string IN_BITANGENT;
156extern MX_GENSHADER_API const string IN_TEXCOORD;
157extern MX_GENSHADER_API const string IN_GEOMPROP;
158extern MX_GENSHADER_API const string IN_COLOR;
159extern MX_GENSHADER_API const string POSITION_WORLD;
160extern MX_GENSHADER_API const string NORMAL_WORLD;
161extern MX_GENSHADER_API const string TANGENT_WORLD;
162extern MX_GENSHADER_API const string BITANGENT_WORLD;
163extern MX_GENSHADER_API const string POSITION_OBJECT;
164extern MX_GENSHADER_API const string NORMAL_OBJECT;
165extern MX_GENSHADER_API const string TANGENT_OBJECT;
166extern MX_GENSHADER_API const string BITANGENT_OBJECT;
167extern MX_GENSHADER_API const string TEXCOORD;
168extern MX_GENSHADER_API const string COLOR;
169extern MX_GENSHADER_API const string WORLD_MATRIX;
170extern MX_GENSHADER_API const string WORLD_INVERSE_MATRIX;
171extern MX_GENSHADER_API const string WORLD_TRANSPOSE_MATRIX;
172extern MX_GENSHADER_API const string WORLD_INVERSE_TRANSPOSE_MATRIX;
173extern MX_GENSHADER_API const string VIEW_MATRIX;
174extern MX_GENSHADER_API const string VIEW_INVERSE_MATRIX;
175extern MX_GENSHADER_API const string VIEW_TRANSPOSE_MATRIX;
176extern MX_GENSHADER_API const string VIEW_INVERSE_TRANSPOSE_MATRIX;
177extern MX_GENSHADER_API const string PROJ_MATRIX;
178extern MX_GENSHADER_API const string PROJ_INVERSE_MATRIX;
179extern MX_GENSHADER_API const string PROJ_TRANSPOSE_MATRIX;
180extern MX_GENSHADER_API const string PROJ_INVERSE_TRANSPOSE_MATRIX;
181extern MX_GENSHADER_API const string WORLD_VIEW_MATRIX;
182extern MX_GENSHADER_API const string VIEW_PROJECTION_MATRIX;
183extern MX_GENSHADER_API const string WORLD_VIEW_PROJECTION_MATRIX;
184extern MX_GENSHADER_API const string VIEW_POSITION;
185extern MX_GENSHADER_API const string VIEW_DIRECTION;
186extern MX_GENSHADER_API const string FRAME;
187extern MX_GENSHADER_API const string TIME;
188extern MX_GENSHADER_API const string GEOMPROP;
189extern MX_GENSHADER_API const string ALPHA_THRESHOLD;
190extern MX_GENSHADER_API const string NUM_ACTIVE_LIGHT_SOURCES;
191extern MX_GENSHADER_API const string ENV_MATRIX;
192extern MX_GENSHADER_API const string ENV_RADIANCE;
193extern MX_GENSHADER_API const string ENV_RADIANCE_SPLIT;
194extern MX_GENSHADER_API const string ENV_RADIANCE_SAMPLER2D;
195extern MX_GENSHADER_API const string ENV_RADIANCE_SAMPLER2D_SPLIT;
196extern MX_GENSHADER_API const string ENV_RADIANCE_MIPS;
197extern MX_GENSHADER_API const string ENV_RADIANCE_SAMPLES;
198extern MX_GENSHADER_API const string ENV_IRRADIANCE;
199extern MX_GENSHADER_API const string ENV_IRRADIANCE_SPLIT;
200extern MX_GENSHADER_API const string ENV_IRRADIANCE_SAMPLER2D;
201extern MX_GENSHADER_API const string ENV_IRRADIANCE_SAMPLER2D_SPLIT;
202extern MX_GENSHADER_API const string ENV_LIGHT_INTENSITY;
203extern MX_GENSHADER_API const string ENV_PREFILTER_MIP;
204extern MX_GENSHADER_API const string REFRACTION_TWO_SIDED;
205extern MX_GENSHADER_API const string ALBEDO_TABLE;
206extern MX_GENSHADER_API const string ALBEDO_TABLE_SIZE;
207extern MX_GENSHADER_API const string AMB_OCC_MAP;
208extern MX_GENSHADER_API const string AMB_OCC_GAIN;
209extern MX_GENSHADER_API const string SHADOW_MAP;
210extern MX_GENSHADER_API const string SHADOW_MATRIX;
211extern MX_GENSHADER_API const string VERTEX_DATA_INSTANCE;
212extern MX_GENSHADER_API const string LIGHT_DATA_INSTANCE;
213extern MX_GENSHADER_API const string LIGHT_DATA_MAX_LIGHT_SOURCES;
214
216extern MX_GENSHADER_API const string TEX_SAMPLER_SAMPLER2D;
217extern MX_GENSHADER_API const string TEX_SAMPLER_SAMPLER2D_SPLIT;
218extern MX_GENSHADER_API const string TEX_SAMPLER_SIGNATURE;
219extern MX_GENSHADER_API const string TEX_SAMPLER_SIGNATURE_SPLIT;
220
222extern MX_GENSHADER_API const string VERTEX_INPUTS; // Geometric inputs for vertex stage.
223extern MX_GENSHADER_API const string VERTEX_DATA; // Connector block for data transfer from vertex stage to pixel stage.
224extern MX_GENSHADER_API const string PRIVATE_UNIFORMS; // Uniform inputs set privately by application.
225extern MX_GENSHADER_API const string PUBLIC_UNIFORMS; // Uniform inputs visible in UI and set by user.
226extern MX_GENSHADER_API const string LIGHT_DATA; // Uniform inputs for light sources.
227extern MX_GENSHADER_API const string PIXEL_OUTPUTS; // Outputs from the main/pixel stage.
228
230extern MX_GENSHADER_API const string CLOSURE_DATA_TYPE;
231extern MX_GENSHADER_API const string CLOSURE_DATA_ARG;
232extern MX_GENSHADER_API const string DIR_N;
233extern MX_GENSHADER_API const string DIR_L;
234extern MX_GENSHADER_API const string DIR_V;
235extern MX_GENSHADER_API const string WORLD_POSITION;
236extern MX_GENSHADER_API const string OCCLUSION;
237
239extern MX_GENSHADER_API const string ATTR_TRANSPARENT;
240
242extern MX_GENSHADER_API const string USER_DATA_LIGHT_SHADERS;
243extern MX_GENSHADER_API const string USER_DATA_BINDING_CONTEXT;
244
246extern MX_GENSHADER_API const TypeDesc ClosureDataType;
247} // namespace HW
248
249namespace Stage
250{
252extern MX_GENSHADER_API const string VERTEX;
253} // namespace Stage
254
255class HwLightShaders;
258
260using HwLightShadersPtr = shared_ptr<class HwLightShaders>;
262using HwShaderGeneratorPtr = shared_ptr<class HwShaderGenerator>;
264using HwResourceBindingContextPtr = shared_ptr<class HwResourceBindingContext>;
265
268class MX_GENSHADER_API HwLightShaders : public GenUserData
269{
270 public:
273 {
274 return std::make_shared<HwLightShaders>();
275 }
276
278 void bind(unsigned int type, ShaderNodePtr shader)
279 {
280 _shaders[type] = shader;
281 }
282
284 void unbind(unsigned int type)
285 {
286 _shaders.erase(type);
287 }
288
290 void clear()
291 {
292 _shaders.clear();
293 }
294
297 const ShaderNode* get(unsigned int type) const
298 {
299 auto it = _shaders.find(type);
300 return it != _shaders.end() ? it->second.get() : nullptr;
301 }
302
304 const std::unordered_map<unsigned int, ShaderNodePtr>& get() const
305 {
306 return _shaders;
307 }
308
309 protected:
310 std::unordered_map<unsigned int, ShaderNodePtr> _shaders;
311};
312
315class MX_GENSHADER_API HwShaderGenerator : public ShaderGenerator
316{
317 public:
319 virtual void addStageLightingUniforms(GenContext& context, ShaderStage& stage) const;
320
322 bool nodeNeedsClosureData(const ShaderNode& node) const override;
323
328 static void bindLightShader(const NodeDef& nodeDef, unsigned int lightTypeId, GenContext& context);
329
331 static void unbindLightShader(unsigned int lightTypeId, GenContext& context);
332
334 static void unbindLightShaders(GenContext& context);
335
337 virtual string getVertexDataPrefix(const VariableBlock& vertexData) const = 0;
338
339 // Note : the order must match the order defined in libraries/pbrlib/genglsl/lib/mx_closure_type.glsl
340 // TODO : investigate build time mechanism for ensuring these stay in sync.
341
344 {
345 DEFAULT,
346 REFLECTION,
347 TRANSMISSION,
348 INDIRECT,
349 EMISSION,
350 LIGHTING,
351 CLOSURE
352 };
353
354 protected:
355 HwShaderGenerator(TypeSystemPtr typeSystem, SyntaxPtr syntax);
356
358 virtual ShaderPtr createShader(const string& name, ElementPtr element, GenContext& context) const;
359};
360
363class MX_GENSHADER_API HwImplementation : public ShaderNodeImpl
364{
365 public:
366 bool isEditable(const ShaderInput& input) const override;
367
368 protected:
369 HwImplementation() { }
370
371 // Integer identifiers for coordinate spaces.
372 // The order must match the order given for the space enum string in stdlib.
373 enum Space
374 {
375 MODEL_SPACE = 0,
376 OBJECT_SPACE = 1,
377 WORLD_SPACE = 2
378 };
379
381 static const string SPACE;
382 static const string INDEX;
383 static const string GEOMPROP;
384};
385
388class MX_GENSHADER_API HwResourceBindingContext : public GenUserData
389{
390 public:
391 virtual ~HwResourceBindingContext() { }
392
393 // Initialize the context before generation starts.
394 virtual void initialize() = 0;
395
396 // Emit directives required for binding support
397 virtual void emitDirectives(GenContext& context, ShaderStage& stage) = 0;
398
399 // Emit uniforms with binding information
400 virtual void emitResourceBindings(GenContext& context, const VariableBlock& uniforms, ShaderStage& stage) = 0;
401
402 // Emit struct uniforms with binding information
403 virtual void emitStructuredResourceBindings(GenContext& context, const VariableBlock& uniforms,
404 ShaderStage& stage, const std::string& structInstanceName,
405 const std::string& arraySuffix = EMPTY_STRING) = 0;
406};
407
408MATERIALX_NAMESPACE_END
409
410#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:262
shared_ptr< class HwResourceBindingContext > HwResourceBindingContextPtr
Shared pointer to a HwResourceBindingContext.
Definition HwShaderGenerator.h:264
shared_ptr< class HwLightShaders > HwLightShadersPtr
Shared pointer to a HwLightShaders.
Definition HwShaderGenerator.h:260
Macros for declaring imported and exported symbols.
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
Definition Library.h:33
Base shader generator class.
shared_ptr< class ShaderNode > ShaderNodePtr
Shared pointer to a ShaderNode.
Definition ShaderNode.h:35
shared_ptr< Syntax > SyntaxPtr
Shared pointer to a Syntax.
Definition Syntax.h:28
A context class for shader generation.
Definition GenContext.h:30
bool isEditable(const ShaderInput &input) const override
Returns true if an input is editable by users.
static const string SPACE
Internal string constants.
Definition HwShaderGenerator.h:381
Hardware light shader user data.
Definition HwShaderGenerator.h:269
void bind(unsigned int type, ShaderNodePtr shader)
Bind a light shader to a light type id.
Definition HwShaderGenerator.h:278
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:297
const std::unordered_map< unsigned int, ShaderNodePtr > & get() const
Return the map of bound light shaders.
Definition HwShaderGenerator.h:304
static HwLightShadersPtr create()
Create and return a new instance.
Definition HwShaderGenerator.h:272
void clear()
Clear all light shaders previously bound.
Definition HwShaderGenerator.h:290
void unbind(unsigned int type)
Unbind a light shader previously bound to a light type id.
Definition HwShaderGenerator.h:284
Class representing a context for resource binding for hardware resources.
Definition HwShaderGenerator.h:389
Base class for shader generators targeting HW rendering.
Definition HwShaderGenerator.h:316
static void unbindLightShader(unsigned int lightTypeId, GenContext &context)
Unbind a light shader previously bound to the given light type id.
virtual ShaderPtr createShader(const string &name, ElementPtr element, GenContext &context) const
Create and initialize a new HW shader for shader generation.
virtual void addStageLightingUniforms(GenContext &context, ShaderStage &stage) const
Emit code for active light count definitions and uniforms.
static void bindLightShader(const NodeDef &nodeDef, unsigned int lightTypeId, GenContext &context)
Bind a light shader to a light type id, for usage in surface shaders created by the generator.
static void unbindLightShaders(GenContext &context)
Unbind all light shaders previously bound.
bool nodeNeedsClosureData(const ShaderNode &node) const override
Return true if the node needs the ClosureData struct added.
ClosureContextType
Types of closure contexts for HW.
Definition HwShaderGenerator.h:344
virtual string getVertexDataPrefix(const VariableBlock &vertexData) const =0
Determine the prefix of vertex data variables.
A node definition element within a Document.
Definition Definition.h:82
ShaderGenerator(TypeSystemPtr typeSystem, SyntaxPtr syntax)
Protected constructor.
An input on a ShaderNode.
Definition ShaderNode.h:264
Class representing a node in the shader generation DAG.
Definition ShaderNode.h:320
ShaderNodeImpl()
Protected constructor.
A shader stage, containing the state and resulting source code for the stage.
Definition ShaderStage.h:141
A type descriptor for MaterialX data types.
Definition TypeDesc.h:40
A block of variables in a shader stage.
Definition ShaderStage.h:63
HW specific identifiers.
Definition HwShaderGenerator.h:88
MX_GENSHADER_API const string CLOSURE_DATA_TYPE
Variable names for lighting parameters.
MX_GENSHADER_API const string IN_POSITION
Default names for identifiers.
MX_GENSHADER_API const TypeDesc ClosureDataType
Type Descriptor for closure context data.
MX_GENSHADER_API const string T_IN_POSITION
Token identifiers.
MX_GENSHADER_API const string ATTR_TRANSPARENT
Attribute names.
MX_GENSHADER_API const string TEX_SAMPLER_SAMPLER2D
Texture sampler parameters (for both combined and separate values)
MX_GENSHADER_API const string VERTEX_INPUTS
Variable blocks names.
MX_GENSHADER_API const string USER_DATA_LIGHT_SHADERS
User data names.