MaterialX 1.38.10
Loading...
Searching...
No Matches
SurfaceShaderNodeGlsl.h
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef MATERIALX_SURFACESHADERNODEGLSL_H
7#define MATERIALX_SURFACESHADERNODEGLSL_H
8
10#include <MaterialXGenShader/Nodes/SourceCodeNode.h>
11
12MATERIALX_NAMESPACE_BEGIN
13
16class MX_GENGLSL_API SurfaceShaderNodeGlsl : public SourceCodeNode
17{
18 public:
19 static ShaderNodeImplPtr create();
20
21 const string& getTarget() const override;
22
23 void createVariables(const ShaderNode& node, GenContext& context, Shader& shader) const override;
24
25 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
26};
27
28MATERIALX_NAMESPACE_END
29
30#endif
Macros for declaring imported and exported symbols.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
A context class for shader generation.
Definition: GenContext.h:31
Class containing all data needed during shader generation.
Definition: Shader.h:33
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:326
virtual const string & getTarget() const
Return an identifier for the target used by this implementation.
Definition: ShaderNodeImpl.h:39
virtual void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const
Create shader variables needed for the implementation of this node (e.g.
Definition: ShaderNodeImpl.cpp:49
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:139
Implemention for a node using data-driven static source code.
Definition: SourceCodeNode.h:20
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: SourceCodeNode.cpp:99
SurfaceShader node implementation for GLSL Used for all surface shaders implemented in source code.
Definition: SurfaceShaderNodeGlsl.h:17