mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
43b0ae1ce7
remove debug draw shader, now that debug and debugdraw serve the same function remove debug draw code from actors to clean replaced int uniforms with bool for better readability clang format cleanup, remove unused func, and mistake whitespace fix namespace added more colors fixed missing whitespace
32 lines
711 B
GLSL
32 lines
711 B
GLSL
#version 120
|
|
|
|
#include "openmw_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)
|
|
{
|
|
gl_Position = mw_modelToClip( vec4(gl_Vertex));
|
|
vertexNormal = vec3(1., 1., 1.);
|
|
passColor = gl_Color;
|
|
}
|
|
else
|
|
{
|
|
gl_Position = mw_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.);
|
|
}
|
|
|
|
}
|