mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 17:40:06 +00:00
GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.
This corrects the invalid position values in some games when doing attribute-less rendering.
This commit is contained in:
parent
281fd881a0
commit
004b1b3830
@ -538,7 +538,7 @@ private:
|
||||
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
|
||||
// shader.
|
||||
ASSERT(stage == Maxwell3D::Regs::ShaderStage::Vertex);
|
||||
return "vec4(0, 0, gl_InstanceID, gl_VertexID)";
|
||||
return "vec4(0, 0, uintBitsToFloat(gl_InstanceID), uintBitsToFloat(gl_VertexID))";
|
||||
default:
|
||||
const u32 index{static_cast<u32>(attribute) -
|
||||
static_cast<u32>(Attribute::Index::Attribute_0)};
|
||||
|
Loading…
Reference in New Issue
Block a user