2021-32-bit-holiday-jam/shaders/pumpkin-vert.glsl

30 lines
734 B
GLSL

#define lowp
#define mediump
#define highp
#line 0
uniform highp mat4 uni_mvp;
uniform lowp vec3 uni_albedo;
uniform lowp vec3 uni_object_space_sky;
uniform lowp vec3 uni_object_space_light;
attribute highp vec4 attr_pos;
attribute mediump vec2 attr_uv;
attribute lowp vec3 attr_normal;
varying lowp vec3 vary_color;
varying lowp vec3 vary_normal;
varying mediump vec2 vary_uv;
varying lowp vec3 vary_object_space_light;
varying lowp vec3 vary_object_space_sky;
void main (void) {
vary_uv = attr_uv;
vary_normal = attr_normal;
vary_color = uni_albedo * uni_albedo;
vary_object_space_light = normalize (uni_object_space_light);
vary_object_space_sky = normalize (uni_object_space_sky);
gl_Position = uni_mvp * attr_pos;
}