eo/shaders/vs_basic.sc

18 lines
352 B
Scala

$input a_position, a_texcoord0
$output v_texcoord0
uniform vec4 u_position;
uniform vec4 u_rotation;
uniform vec4 u_scale;
#include <bgfx_shader.sh>
void main() {
vec4 scale = mul(u_scale, vec4(a_position, 1.0f));
vec4 view = mul(u_view, scale);
vec4 pos = view + u_position;
gl_Position = mul(u_proj, pos);
v_texcoord0 = a_texcoord0;
}