mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
To calculate the mipmap value the opengl needs to calculate the difference in the texture coordinates between adjacent pixels. If there are no adjacent pixels the hw may need to spawn invisible fragments outside of the visible polygon. Our algorithm was culling these out so the mipamp calculation failed for edge pixels. Anyway this fixes quad rendering looking broken with the latest nvidia drivers.
This commit is contained in:
parent
06688de5fc
commit
a5858e635d
|
@ -3,7 +3,7 @@
|
|||
|
||||
static const char *vertexShaderR3DQuads = R"glsl(
|
||||
|
||||
#version 410 core
|
||||
#version 450 core
|
||||
|
||||
// uniforms
|
||||
uniform float modelScale;
|
||||
|
@ -53,7 +53,7 @@ void main(void)
|
|||
|
||||
static const char *geometryShaderR3DQuads = R"glsl(
|
||||
|
||||
#version 410 core
|
||||
#version 450 core
|
||||
|
||||
layout (lines_adjacency) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
|
@ -143,7 +143,7 @@ void main(void)
|
|||
|
||||
static const char *fragmentShaderR3DQuads = R"glsl(
|
||||
|
||||
#version 410 core
|
||||
#version 450 core
|
||||
|
||||
uniform sampler2D tex1; // base tex
|
||||
uniform sampler2D tex2; // micro tex (optional)
|
||||
|
@ -277,8 +277,10 @@ void QuadraticInterpolation()
|
|||
}
|
||||
}
|
||||
if (abs(lambdaSignCount) != 4) {
|
||||
if(!gl_HelperInvocation) {
|
||||
discard; // need to revisit this
|
||||
}
|
||||
}
|
||||
|
||||
float interp_oneOverW = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue