xemu icon indicating copy to clipboard operation
xemu copied to clipboard

nv2a 0x97 -> 0x17c4 (glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE)?) unhandled

Open dracc opened this issue 3 years ago • 3 comments

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

dracc avatar Feb 02 '22 09:02 dracc

Affects: https://xemu.app/titles/41530001/#Break-Nine-World-Billiards-Tournament

Triticum0 avatar Jun 27 '22 16:06 Triticum0

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

abaire avatar Jul 17 '23 06:07 abaire

Affects Lotus Challenge

xemu.log

Triticum0 avatar Jun 02 '25 19:06 Triticum0