mirror of https://github.com/OpenMW/openmw.git
all debug renders now use the same shader and it works
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 whitespacecrashfix_debugdraw
parent
21971c08ba
commit
43b0ae1ce7
@ -1,23 +0,0 @@
|
||||
#version 120
|
||||
#include "vertexcolors.glsl"
|
||||
|
||||
varying vec3 vertexColor;
|
||||
varying vec3 vertexNormal;
|
||||
|
||||
uniform int useAdvancedShader = 0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 lightDir = normalize(vec3(-1., -0.5, -2.));
|
||||
|
||||
float lightAttenuation = dot(-lightDir, vertexNormal) * 0.5 + 0.5;
|
||||
|
||||
if(useAdvancedShader == 0)
|
||||
{
|
||||
gl_FragData[0] = getDiffuseColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_FragData[0] = vec4(vertexColor * lightAttenuation, 1.);
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
#version 120
|
||||
#include "openmw_vertex.h.glsl"
|
||||
|
||||
uniform vec3 color;
|
||||
uniform vec3 trans;
|
||||
uniform vec3 scale;
|
||||
uniform int useNormalAsColor;
|
||||
uniform int useAdvancedShader = 0;
|
||||
|
||||
varying vec3 vertexColor;
|
||||
varying vec3 vertexNormal;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = mw_modelToClip( vec4(gl_Vertex.xyz * scale + trans,1));
|
||||
|
||||
if(useAdvancedShader == 0)
|
||||
{
|
||||
vertexNormal = vec3(1., 1., 1.);
|
||||
vertexColor = gl_Color.xyz;
|
||||
}
|
||||
else
|
||||
{
|
||||
vertexNormal = useNormalAsColor == 1 ? vec3(1., 1., 1.) : gl_Normal.xyz;
|
||||
vertexColor = useNormalAsColor == 1 ? gl_Normal.xyz : color.xyz;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue