mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-22 11:56:58 +02:00
shader: double the cube major axis once after selecting the face
This commit is contained in:
@@ -222,13 +222,10 @@ void Translator::FloatCube(const Decoder::Instruction& inst, uint32_t result_kin
|
|||||||
break;
|
break;
|
||||||
case 1u: result = select_face(SelectF32(x_neg, z, nz), x, SelectF32(z_neg, nx, x)); break;
|
case 1u: result = select_face(SelectF32(x_neg, z, nz), x, SelectF32(z_neg, nx, x)); break;
|
||||||
case 2u: result = select_face(ny, SelectF32(y_neg, nz, z), ny); break;
|
case 2u: result = select_face(ny, SelectF32(y_neg, nz, z), ny); break;
|
||||||
case 3u: {
|
case 3u:
|
||||||
const auto two = IR::F32(IR::Value::F32(2.0f));
|
result = IR::F32(
|
||||||
result = select_face(IR::F32(ir.Emit(IR::ValueOpcode::FPMul32, {x, two})),
|
ir.Emit(IR::ValueOpcode::FPMul32, {select_face(x, y, z), IR::Value::F32(2.0f)}));
|
||||||
IR::F32(ir.Emit(IR::ValueOpcode::FPMul32, {y, two})),
|
|
||||||
IR::F32(ir.Emit(IR::ValueOpcode::FPMul32, {z, two})));
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
default: EXIT("invalid cube result kind");
|
default: EXIT("invalid cube result kind");
|
||||||
}
|
}
|
||||||
WriteOperand(DestinationOperand(inst), result);
|
WriteOperand(DestinationOperand(inst), result);
|
||||||
|
|||||||
Reference in New Issue
Block a user