mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 04:20:29 +00:00
changes when the buffers are reset -> at the end of the draw, because that's when we are certain the data isn't needed anymore removed useless variable fixed typo include osg::vec3 instead of osg vec3f compile linux compile ? applied clang format to the new files
23 lines
512 B
GLSL
23 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;
|
|
}
|