MaterialX 1.39.3
Loading...
Searching...
No Matches
SurfaceNodeGlsl.h
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef MATERIALX_SURFACENODEGLSL_H
7#define MATERIALX_SURFACENODEGLSL_H
8
11
12MATERIALX_NAMESPACE_BEGIN
13
15class MX_GENGLSL_API SurfaceNodeGlsl : public GlslImplementation
16{
17 public:
18 SurfaceNodeGlsl();
19
20 static ShaderNodeImplPtr create();
21
22 void createVariables(const ShaderNode& node, GenContext& context, Shader& shader) const override;
23
24 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
25
26 virtual void emitLightLoop(const ShaderNode& node, GenContext& context, ShaderStage& stage, const string& outColor) const;
27};
28
29MATERIALX_NAMESPACE_END
30
31#endif
GLSL shader generator.
Macros for declaring imported and exported symbols.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition Library.h:39
A context class for shader generation.
Definition GenContext.h:30
Class containing all data needed during shader generation.
Definition Shader.h:33
Class representing a node in the shader generation DAG.
Definition ShaderNode.h:320
A shader stage, containing the state and resulting source code for the stage.
Definition ShaderStage.h:139
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.
void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const override
Create shader variables needed for the implementation of this node (e.g.