1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/files/shaders/debugDraw_vertex.glsl
florent.teppe 76008e1ff8 Multiple shapes to draw
adds wireCube primitive

scale of the command taken into account

shading light is more vertical
2022-09-11 17:53:47 +02:00

28 lines
519 B
GLSL

#version 330 compatibility
uniform mat4 projectionMatrix;
// vec4 mw_modelToClip(vec4 pos);
// vec4 mw_modelToView(vec4 pos);
// vec4 mw_viewToClip(vec4 pos);
uniform vec3 passColor;
uniform vec3 trans;
uniform vec3 scale;
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
out vec3 vertexColor;
out vec3 vertexNormal;
void main()
{
gl_Position = projectionMatrix * gl_ModelViewMatrix * vec4(aPos * scale + trans, 1.);
vertexNormal = aNormal;
vertexColor = passColor.xyz;
}