forked from autodesk-forks/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenGlsl.h
51 lines (41 loc) · 1.79 KB
/
GenGlsl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#ifndef GENGLSL_H
#define GENGLSL_H
#include <MaterialXTest/GenShaderUtil.h>
namespace mx = MaterialX;
class GlslShaderGeneratorTester : public GenShaderUtil::ShaderGeneratorTester
{
public:
using ParentClass = GenShaderUtil::ShaderGeneratorTester;
GlslShaderGeneratorTester(mx::ShaderGeneratorPtr shaderGenerator, const mx::FilePathVec& testRootPaths,
const mx::FilePath& libSearchPath, const mx::FileSearchPath& srcSearchPath,
const mx::FilePath& logFilePath) :
GenShaderUtil::ShaderGeneratorTester(shaderGenerator, testRootPaths, libSearchPath, srcSearchPath, logFilePath)
{}
void setTestStages() override
{
_testStages.push_back(mx::Stage::VERTEX);
_testStages.push_back(mx::Stage::PIXEL);
}
void setupDependentLibraries() override
{
ParentClass::setupDependentLibraries();
mx::FilePath lightDir = mx::FilePath::getCurrentPath() / mx::FilePath("resources/Materials/TestSuite/Utilities/Lights");
GenShaderUtil::loadLibrary(lightDir / mx::FilePath("lightcompoundtest.mtlx"), _dependLib);
GenShaderUtil::loadLibrary(lightDir / mx::FilePath("light_rig.mtlx"), _dependLib);
}
protected:
void getImplementationWhiteList(mx::StringSet& whiteList) override
{
whiteList =
{
"ambientocclusion", "arrayappend", "backfacing", "screen", "curveadjust", "displacementshader",
"volumeshader", "IM_constant_", "IM_dot_", "IM_geomattrvalue", "IM_light_genglsl",
"IM_point_light_genglsl", "IM_spot_light_genglsl", "IM_directional_light_genglsl"
};
}
};
#endif // GENGLSL_H