mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 16:37:30 +00:00
add5440ad1
Not all hardware can access a texture sampler from the vertex shader, and I don't want multiple paths this early in the game. Now, vertex normals are uploaded as shorts. Should be 14 bytes per vertex (was 10, could have been 8 if I had put the normal index with the vertex rather than st).
21 lines
356 B
GLSL
21 lines
356 B
GLSL
uniform mat4 mvp_mat;
|
|
uniform mat3 norm_mat;
|
|
uniform vec2 skin_size;
|
|
|
|
attribute vec4 vcolor;
|
|
attribute vec2 vst;
|
|
attribute vec3 vnormal;
|
|
attribute vec3 vertex;
|
|
|
|
varying vec3 normal;
|
|
varying vec2 st;
|
|
varying vec4 color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
gl_Position = mvp_mat * vec4 (vertex, 1.0);
|
|
st = vst / skin_size;
|
|
normal = norm_mat * vnormal;
|
|
color = vcolor;
|
|
}
|