-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshader_normalMap.cpp
64 lines (51 loc) · 1.08 KB
/
shader_normalMap.cpp
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
52
53
54
55
56
57
58
59
60
61
62
63
#include "shader_normalMap.hpp"
#include "manager.hpp"
ShaderNormalMap::ShaderNormalMap(const char* vs_filepath, const char* fs_filepath) : Shader(vs_filepath, fs_filepath)
{
fprintf(stderr, "ShaderNormalMap onstructing\n");
std::string path1 = "data/2D/colorMap.png";
std::string path2 = "data/2D/normalMap.png";
colorMap = std::shared_ptr<Sprite>(new Sprite(path1));
normalMap = std::shared_ptr<Sprite>(new Sprite(path2));
}
ShaderNormalMap::~ShaderNormalMap()
{
}
void ShaderNormalMap::update()
{
use();
set_int("size_x", 1024);
set_int("size_y", 1024);
set_float("time", manager.getTime()*10);
colorMap->bind(0);
normalMap->bind(1);
set_int("colorMap", 0);
set_int("normalMap", 1);
}
void ShaderNormalMap::action1()
{
}
void ShaderNormalMap::action2()
{
}
void ShaderNormalMap::action3()
{
}
void ShaderNormalMap::action4()
{
}
void ShaderNormalMap::action5()
{
}
void ShaderNormalMap::action6()
{
}
void ShaderNormalMap::action7()
{
}
void ShaderNormalMap::action8()
{
}
void ShaderNormalMap::synthAction(unsigned char input_data[])
{
}