forked from mausimus/ShaderGlass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShader.template
38 lines (34 loc) · 992 Bytes
/
Shader.template
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
/*
%HEADER%
*/
#pragma once
namespace %LIB_NAME%%CLASS_NAME%ShaderDefs
{
static const BYTE sVertexByteCode[] =
%VERTEX_BYTECODE%
static const BYTE sFragmentByteCode[] =
%FRAGMENT_BYTECODE%
}
namespace %LIB_NAME%
{
class %CLASS_NAME%ShaderDef : public ShaderDef
{
public:
%CLASS_NAME%ShaderDef() : ShaderDef{}
{
Name = "%SHADER_NAME%";
VertexByteCode = %LIB_NAME%%CLASS_NAME%ShaderDefs::sVertexByteCode;
VertexLength = sizeof(%LIB_NAME%%CLASS_NAME%ShaderDefs::sVertexByteCode);
FragmentByteCode = %LIB_NAME%%CLASS_NAME%ShaderDefs::sFragmentByteCode;
FragmentLength = sizeof(%LIB_NAME%%CLASS_NAME%ShaderDefs::sFragmentByteCode);
%PARAM% Params.push_back(ShaderParam("%PARAM_NAME%", %PARAM_BUFFER%, %PARAM_OFFSET%, %PARAM_SIZE%, %PARAM_MIN%f, %PARAM_MAX%f, %PARAM_DEF%f, %PARAM_STEP%f, "%PARAM_DESC%"));
%TEXTURE% Samplers.push_back(ShaderSampler("%TEXTURE_NAME%", %TEXTURE_BINDING%));
/*
VertexSource = %*VERTEX_SOURCE*%;
*/
/*
FragmentSource = %*FRAGMENT_SOURCE*%;
*/
}
};
}