mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 19:07:01 +02:00
Fix PS5 front-face VGPR encoding to restore scene lighting
This commit is contained in:
@@ -46,8 +46,9 @@ uint32_t EmitBuiltinU32(EmitterState& state, IR::StageInputKind kind, uint32_t c
|
|||||||
const auto value = state.builder.AllocateId();
|
const auto value = state.builder.AllocateId();
|
||||||
const auto bits = state.builder.AllocateId();
|
const auto bits = state.builder.AllocateId();
|
||||||
state.builder.AddFunction(spv::OpLoad, TypeBool(state), value, variable);
|
state.builder.AddFunction(spv::OpLoad, TypeBool(state), value, variable);
|
||||||
state.builder.AddFunction(spv::OpSelect, TypeU32(state), bits, value, ConstantU32(state, 1),
|
// PS5 initializes v_front_face with float +1.0/-1.0 bits.
|
||||||
ConstantU32(state, 0));
|
state.builder.AddFunction(spv::OpSelect, TypeU32(state), bits, value,
|
||||||
|
ConstantU32(state, 0x3f800000u), ConstantU32(state, 0xbf800000u));
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
if (kind == IR::StageInputKind::VertexIndex || kind == IR::StageInputKind::InstanceIndex ||
|
if (kind == IR::StageInputKind::VertexIndex || kind == IR::StageInputKind::InstanceIndex ||
|
||||||
|
|||||||
Reference in New Issue
Block a user