Fix value of constant vertex attributes (#2307)

This commit is contained in:
gdkchan 2021-05-24 04:38:38 -03:00 committed by GitHub
parent 79092310fa
commit 3fd6b55f04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 10 deletions

View file

@ -80,7 +80,7 @@ namespace Ryujinx.Graphics.OpenGL
if (attrib.IsZero)
{
// Disabling the attribute causes the shader to read a constant value.
// The value is configurable, but by default is a vector of (0, 0, 0, 1).
// We currently set the constant to (0, 0, 0, 0).
DisableVertexAttrib(index);
}
else
@ -176,6 +176,7 @@ namespace Ryujinx.Graphics.OpenGL
{
_vertexAttribsInUse &= ~mask;
GL.DisableVertexAttribArray(index);
GL.VertexAttrib4(index, 0f, 0f, 0f, 0f);
}
}