-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathShader.template
More file actions
47 lines (41 loc) · 1.19 KB
/
Shader.template
File metadata and controls
47 lines (41 loc) · 1.19 KB
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
/*
%HEADER%
*/
#pragma once
namespace %LIB_NAME%%CLASS_NAME%ShaderDefs
{
static const BYTE sVertexByteCode[] =
%VERTEX_BYTECODE%
static const BYTE sFragmentByteCode[] =
%FRAGMENT_BYTECODE%
static const uint32_t sVertexHash[] =
%VERTEX_HASH%
static const uint32_t sFragmentHash[] =
%FRAGMENT_HASH%
}
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);
VertexHash = %LIB_NAME%%CLASS_NAME%ShaderDefs::sVertexHash;
FragmentByteCode = %LIB_NAME%%CLASS_NAME%ShaderDefs::sFragmentByteCode;
FragmentLength = sizeof(%LIB_NAME%%CLASS_NAME%ShaderDefs::sFragmentByteCode);
FragmentHash = %LIB_NAME%%CLASS_NAME%ShaderDefs::sFragmentHash;
Format = "%SHADER_FORMAT%";
%PARAM% AddParam("%PARAM_NAME%", %PARAM_BUFFER%, %PARAM_OFFSET%, %PARAM_SIZE%, %PARAM_MIN%f, %PARAM_MAX%f, %PARAM_DEF%f, %PARAM_STEP%f, "%PARAM_DESC%");
%TEXTURE% AddSampler("%TEXTURE_NAME%", %TEXTURE_BINDING%);
/*
VertexSource = %*VERTEX_SOURCE*%;
*/
/*
FragmentSource = %*FRAGMENT_SOURCE*%;
*/
}
};
}