mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
21971c08ba
renamed files roundabout way to change case with windows noticing fixed type fix filename in cmakelist.txt ported shader and c++ code so glsl 120 can be used instead of 330 new debug shader and old one are almost unified for some reason, even though I get no compilation issue, old debug draws don't work, only the new one implemented by this MR remove useless const cast
30 lines
659 B
GLSL
30 lines
659 B
GLSL
#version 120
|
|
|
|
#include "openmw_vertex.h.glsl"
|
|
|
|
uniform vec3 color;
|
|
uniform vec3 trans;
|
|
uniform vec3 scale;
|
|
uniform int useNormalAsColor;
|
|
uniform int useAdvancedShader = 0;
|
|
|
|
centroid varying vec4 passColor;
|
|
varying vec3 vertexNormal;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = mw_modelToClip( vec4(gl_Vertex.xyz * scale + trans,1));
|
|
if(useAdvancedShader == 0)
|
|
{
|
|
vertexNormal = vec3(1., 1., 1.);
|
|
passColor = gl_Color;
|
|
}
|
|
else
|
|
{
|
|
vertexNormal = useNormalAsColor == 1 ? vec3(1., 1., 1.) : gl_Normal.xyz;
|
|
vec3 colorOut = useNormalAsColor == 1 ? gl_Normal.xyz : color;
|
|
passColor = vec4(colorOut, 1.);
|
|
}
|
|
|
|
}
|