1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-17 02:42:45 +00:00
OpenMW/files/shaders/debugDraw_vertex.glsl
florent.teppe 2a980ecb50 cleaned some code and fixed some naming issues
Moved debug draw to components, fixed some whitespace issues, added include guard

fixed uniform name, removed old files

Fixes some more whitespace weirdness
2022-09-11 17:53:53 +02:00

24 lines
512 B
GLSL

#version 330 compatibility
uniform mat4 projectionMatrix;
uniform vec3 color;
uniform vec3 trans;
uniform vec3 scale;
uniform int useNormalAsColor;
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 = useNormalAsColor == 1? vec3(1.,1.,1.) : aNormal ;
vertexColor = useNormalAsColor == 1? aNormal : color.xyz;
}