MaterialX 1.38.2
LightShaderNodeGlsl.h
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_LIGHTSHADERNODEGLSL_H
7#define MATERIALX_LIGHTSHADERNODEGLSL_H
8
10#include <MaterialXGenShader/Nodes/SourceCodeNode.h>
11
12namespace MaterialX
13{
14
18{
19public:
21
22 static ShaderNodeImplPtr create();
23
24 const string& getTarget() const override;
25
26 void initialize(const InterfaceElement& element, GenContext& context) override;
27
28 void createVariables(const ShaderNode& node, GenContext& context, Shader& shader) const override;
29
30 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
31
32protected:
33 VariableBlock _lightUniforms;
34};
35
36} // namespace MaterialX
37
38#endif
GLSL shader generator.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
A context class for shader generation.
Definition: GenContext.h:27
The base class for interface elements such as Node, NodeDef, and NodeGraph.
Definition: Interface.h:317
LightShader node implementation for GLSL Used for all light shaders implemented in source code.
Definition: LightShaderNodeGlsl.h:18
const string & getTarget() const override
Return an identifier for the target used by this implementation.
Definition: LightShaderNodeGlsl.cpp:23
void emitFunctionCall(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit the function call or inline source code for given node instance in the given context.
Definition: LightShaderNodeGlsl.cpp:68
void initialize(const InterfaceElement &element, GenContext &context) override
Initialize with the given implementation element.
Definition: LightShaderNodeGlsl.cpp:28
void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const override
Create shader variables needed for the implementation of this node (e.g.
Definition: LightShaderNodeGlsl.cpp:52
Class containing all data needed during shader generation.
Definition: Shader.h:34
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
Node implementation using data-driven static source code.
Definition: SourceCodeNode.h:18
A block of variables in a shader stage.
Definition: ShaderStage.h:53