Programming - TwoSideDiffuse for light sources stays clamped to 0 for negative values

Issue:
Beginning with register 0x149 and offset by 0x10 per light, these registers at bit 1 hold the setting of TwoSideDiffuse, where if set to false, negative input values get clamped to 0.0. But, when set to true, they won’t be clamped. I’ve been working on a project that utilizes luminous textures that take from the RR, RG, and RB LUTs to produce a kind of indexed texture. The LUTs and texture are organized in a greyscale manner with 0.0 being black and white being 1.0 in a cascade manner from top-left of each box to bottom right in increments of 0.25 each. The images below show what is displayed on hardware (left), and what is shown on Citra (right) when TwoSideDiffuse is enabled. If TwoSideDiffuse were disabled, then both hardware and Citra would show what is on the right, where it is clamped to 0.0 (as indicated by the color black). When enabled, only hardware shows the correct output with the full greyscale as Citra isn’t affected by the change.

System Information

  • Operating System: Windows 10 Home v1709
  • CPU: Intel Core i5-7300HQ
  • GPU: Nvidia GeForce GTX 1060 with Max-Q Design
  • Citra Version (found in title bar): Citra Nightly | HEAD-febbaed
5 Likes

Thanks for the report! Could you please provide more information by

  1. Test if the software renderer has the same issue
  2. Provide the program (better with source code)

Also, this report should likely goes directly to our issue list https://github.com/citra-emu/citra/issues. Could you please open one there?

Hi! I already posted a link to this in the discord to get attention. But a lot of our devs don’t really use the forums so you might have more luck talking in discord or the #citra-dev IRC channel.

btw TwoSideDiffuse is implemented in citra. So the problem is either it has some bug itself, or something wrong happens elsewhere.

2 Likes