1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/files/shaders/compatibility/debug.vert

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
707 B
GLSL
Raw Normal View History

#version 120
2023-02-25 19:03:39 +00:00
#include "lib/core/vertex.h.glsl"
uniform vec3 color;
uniform vec3 trans;
uniform vec3 scale;
uniform bool useNormalAsColor;
uniform bool useAdvancedShader = false;
centroid varying vec4 passColor;
varying vec3 vertexNormal;
void main()
{
if(!useAdvancedShader)
{
2023-02-25 19:03:39 +00:00
gl_Position = modelToClip( vec4(gl_Vertex));
vertexNormal = vec3(1., 1., 1.);
passColor = gl_Color;
}
else
{
2023-02-25 19:03:39 +00:00
gl_Position = modelToClip( vec4(gl_Vertex.xyz * scale + trans,1));
vertexNormal = useNormalAsColor ? vec3(1., 1., 1.) : gl_Normal.xyz;
vec3 colorOut = useNormalAsColor? gl_Normal.xyz : color;
passColor = vec4(colorOut, 1.);
}
}