Commit 3e3aabef authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

minor fixes in background shader and GeometryRenderer shader

parent 521cb171
......@@ -26,6 +26,6 @@ uniform vec4 _backgroundColor1;
uniform vec4 _backgroundColor2;
void renderBackground(in vec2 texCoords, out vec4 outColor) {
outColor = mix(_backgroundColor1, _backgroundColor2, 0.75 * texCoords.x * texCoords.y);
outColor = mix(_backgroundColor1, _backgroundColor2, 0.5 * (texCoords.x + texCoords.y));
gl_FragDepth = 1.0;
}
\ No newline at end of file
......@@ -57,9 +57,8 @@ void main() {
// Find the smallest distance to the edges
float d = min(geom_EdgeDistance.x, min(geom_EdgeDistance.y, geom_EdgeDistance.z)) * 2.0;
// Determine the mix factor with the line color
float aliasingWidth = min(1.0, (_lineWidth/8.0));
float mixVal = smoothstep(_lineWidth - aliasingWidth, _lineWidth + aliasingWidth, d);
// perform anti-aliasing
float mixVal = smoothstep(_lineWidth - 1.0, _lineWidth + 1.0, d);
// Mix the surface color with the line color
out_Color = mix(_wireframeColor, out_Color, mixVal);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment