charcoal/OpenGLEngine/TexturedVS.glsl
elipzer 0e3982591e Textures Work!
MyBuiltinTexturedScene (number 7) displays a cube that loads its
faces from a hard-coded texture. Mipmaping is supported. Just use
the XXX_MIPMAP_XXX Min/Mag filters to use it. TODO next is
combining lighting and textures and then up after that is shadows.
I may just do lighting and shadows before lighting, shadows, and
textures.
2018-09-16 20:50:51 -04:00

14 lines
347 B
GLSL

#version 430
layout(location = 0) in vec3 vertex_position;
layout(location = 1) in vec2 vertex_uv;
layout(location = 2) in mat4 model_to_world;
layout(location = 0) uniform mat4 world_to_projection;
out vec2 fragment_uv;
void main()
{
fragment_uv = vertex_uv;
gl_Position = world_to_projection * model_to_world * vec4(vertex_position, 1.0);
}