23 lines
689 B
GLSL
23 lines
689 B
GLSL
#version 450
|
|
#extension GL_EXT_scalar_block_layout : require
|
|
#extension GL_ARB_shader_draw_parameters : require
|
|
#extension GL_GOOGLE_include_directive : require
|
|
|
|
#include "common_vs.h"
|
|
|
|
layout(location = 0) in vec3 i_pos;
|
|
layout(location = 1) in vec2 i_uv;
|
|
layout(location = 2) in vec3 i_normal;
|
|
|
|
layout(location = 0) out flat uint o_meshIdx;
|
|
layout(location = 1) out vec2 o_uv;
|
|
|
|
void main()
|
|
{
|
|
gl_Position =
|
|
u_frame_data.frame[p_constants.frame].view_projection *
|
|
u_renderable.frame[p_constants.frame].renderables[gl_DrawIDARB].world *
|
|
vec4(i_pos, 1.0);
|
|
o_meshIdx = u_renderable.frame[p_constants.frame].renderables[gl_DrawIDARB].meshIdx;
|
|
o_uv = i_uv;
|
|
} |