xemu
xemu copied to clipboard
nv2a 0x97 -> 0x17c4 (glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE)?) unhandled
Title
https://xemu.app/titles/4d53006e
Bug Description
According to the debug output, 0x97 -> 0x17c4 is unhandled.
In the NV20 nouveau sources, this instruction is 3D_LIGHT_MODEL_TWO_SIDE_ENABLE, and the values it can take matches what is received in the function calls.
Expected Behavior
The NV2A instruction 0x17c4 should be handled.
xemu Version
0.6.2-55-gcaf84884c4
System Information
N/A
Additional Context
No response
Affects: https://xemu.app/titles/41530001/#Break-Nine-World-Billiards-Tournament
This does enable two sided lighting. This only takes effect on reverse-wound polygons (so culling must be disabled). It also requires setting back alpha (0x17AC) - at least in my test rig this defaults to 0, leading to the poly disappearing completely when back lighting is enabled.
Test: https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/lighting_two_sided_tests.cpp
HW results: https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Lighting_Two_Sided