VOX
A little voxel engine
Loading...
Searching...
No Matches
ShaderCommon.hpp
Go to the documentation of this file.
1#ifndef SHADER_COMMUN_HPP
2#define SHADER_COMMUN_HPP
3
4#ifdef __cplusplus
5
6 #include <glm/glm.hpp>
7 // Glsl types
8 using vec2 = glm::vec2;
9 using vec3 = glm::vec3;
10 using vec4 = glm::vec4;
11 using ivec2 = glm::ivec2;
12 using ivec3 = glm::ivec3;
13 using ivec4 = glm::ivec4;
14 using mat2 = glm::mat2;
15 using mat3 = glm::mat3;
16 using mat4 = glm::mat4;
17
18#endif
19
20#define SHADOW_MAP_MAX_COUNT 8
21
22#define CAMERA_MATRICES_BINDING 0
23#define BLOCK_TEXTURES_BINDING 1
24#define SKYBOX_CUBE_MAP_BINDING 2
25#define SHADOW_MAP_BINDING 3
26#define WATER_RENDERPASS_INPUT_COLOR_ATTACH_BINDING 4
27#define WATER_RENDERPASS_INPUT_DEPTH_ATTACH_BINDING 5
28#define TEST_IMAGE_BINDING 6
29#define PLAYER_SKIN_BINDING 7
30#define SUN_MATRICES_BINDING 8
31#define ATMOSPHERE_PARAM_BINDING 9
32#define ITEM_ICON_TEXTURE_BINDING 10
33#define INSTANCE_DATA_BINDING 11
34
36{
37 mat4 matrice;
38 vec4 color;
39 int layer;
40};
41
43{
44 mat4 view;
45 mat4 proj;
46};
47
49{
51 // TODO: this is vec4 because of alignment, but it should be float
55};
56
57
58#endif // SHADER_COMMUN_HPP
#define SHADOW_MAP_MAX_COUNT
Definition: ShaderCommon.hpp:20
Definition: ShaderCommon.hpp:36
vec4 color
Definition: ShaderCommon.hpp:38
int layer
Definition: ShaderCommon.hpp:39
mat4 matrice
Definition: ShaderCommon.hpp:37
Definition: ShaderCommon.hpp:49
vec3 light_dir
Definition: ShaderCommon.hpp:53
float blend_distance
Definition: ShaderCommon.hpp:54
mat4 view_proj[SHADOW_MAP_MAX_COUNT]
Definition: ShaderCommon.hpp:50
vec4 plane_distances[SHADOW_MAP_MAX_COUNT]
Definition: ShaderCommon.hpp:52
Definition: ShaderCommon.hpp:43
mat4 view
Definition: ShaderCommon.hpp:44
mat4 proj
Definition: ShaderCommon.hpp:45