Fix distance fields not in the center of the screen being completely screwed up

This commit is contained in:
Flameshadowxeroshin
2018-11-08 09:14:44 -06:00
parent 9c9df4070a
commit 338becc5d7
3 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
uniform sampler2D Texture1;
varying vec2 texCoords;
varying vec4 texCoords;
varying vec4 vertexColor;
float aastep(float threshold, float dist) {
@@ -22,6 +22,6 @@ float sample(vec2 tc) {
void main(void)
{
float dfValue = sample(texCoords);
float dfValue = sample(texCoords.st);
gl_FragColor = vec4(vertexColor.rgb, vertexColor.a * dfValue);
}
+4 -3
View File
@@ -1,10 +1,11 @@
//We need this shader to pass the vertex color to the frag shader
varying vec4 vertexColor;
varying vec2 texCoords;
varying vec4 texCoords;
void main(void) {
vec4 position = vec4(gl_Vertex.xyz + gl_Normal * 0.125, 1.0);
gl_Position = gl_ModelViewProjectionMatrix * position;
texCoords = gl_MultiTexCoord0;
vertexColor = gl_Color;
texCoords = gl_MultiTexCoord0.st;
gl_Position = gl_Vertex * gl_ModelViewProjectionMatrix;
}
+2 -2
View File
@@ -1842,7 +1842,7 @@ PrevScreen="ScreenInit"
NextScreen=Branch.AfterInit()
StartScreen=Branch.TitleMenu()
#
ForceTimer=true
ForceTimer=false
TimerSeconds=5
#
PlayMusic=false
@@ -4912,4 +4912,4 @@ AmbientFailedColor=color(".2,.1,.1,1")
# Diffuse color of the scene.
DiffuseColor=color("1,.95,.95,1")
DiffuseDangerColor=color(".8,.1,.1,1")
DiffuseFailedColor=color(".4,.1,.1,1")
DiffuseFailedColor=color(".4,.1,.1,1")