stk-code_catmod/data/shaders/ge_shaders/utils/spm_layout.h

44 lines
1.1 KiB
C
Raw Normal View History

2022-07-21 00:26:06 -04:00
layout(std140, set = 1, binding = 0) uniform CameraBuffer
2022-07-19 03:56:08 -04:00
{
mat4 m_view_matrix;
mat4 m_projection_matrix;
mat4 m_inverse_view_matrix;
mat4 m_inverse_projection_matrix;
mat4 m_projection_view_matrix;
2022-08-21 02:09:56 -04:00
mat4 m_inverse_projection_view_matrix;
2022-07-19 03:56:08 -04:00
} u_camera;
struct ObjectData
{
vec4 m_position;
vec4 m_rotation;
vec4 m_scale;
2022-07-21 00:26:06 -04:00
int m_skinning_offest;
int m_material_id;
vec2 m_texture_trans;
2022-07-19 03:56:08 -04:00
};
2022-07-21 00:26:06 -04:00
layout(std140, set = 1, binding = 1) readonly buffer ObjectBuffer
2022-07-19 03:56:08 -04:00
{
ObjectData m_objects[];
} u_object_buffer;
2022-07-26 00:47:31 -04:00
layout(std140, set = 1, binding = 2) readonly buffer SkinningMatrices
{
mat4 m_mat[];
} u_skinning_matrices;
2022-07-19 03:56:08 -04:00
layout(location = 0) in vec3 v_position;
layout(location = 1) in vec4 v_normal;
layout(location = 2) in vec4 v_color;
layout(location = 3) in vec2 v_uv;
layout(location = 4) in vec2 v_uv_two;
layout(location = 5) in vec4 v_tangent;
layout(location = 6) in ivec4 v_joint;
layout(location = 7) in vec4 v_weight;
layout(location = 0) out vec4 f_vertex_color;
2022-07-21 00:26:06 -04:00
layout(location = 1) out vec2 f_uv;
2022-07-28 01:37:09 -04:00
layout(location = 2) out vec2 f_uv_two;
layout(location = 3) flat out int f_material_id;