- Improve softpoly sky rendering a little bit

This commit is contained in:
Magnus Norddahl 2017-05-05 03:27:22 +02:00
commit 4fcea96a1c
3 changed files with 166 additions and 17 deletions

View file

@ -209,7 +209,8 @@ void PolyTriangleDrawer::draw_shaded_triangle(const ShadedTriVertex *vert, bool
#endif
// Keep varyings in -128 to 128 range if possible
if (numclipvert > 0)
// But don't do this for the skycap mode since the V texture coordinate is used for blending
if (numclipvert > 0 && args->uniforms->BlendMode() != TriBlendMode::Skycap)
{
float newOriginU = floorf(clippedvert[0].u * 0.1f) * 10.0f;
float newOriginV = floorf(clippedvert[0].v * 0.1f) * 10.0f;