KhronosGroup / ANARI-SDK

ANARI Software Development Kit (SDK)
Apache License 2.0
225 stars 35 forks source link

FLOAT32_VEC4 color is wrong in helide device #231

Closed UX3D-haertl closed 2 months ago

UX3D-haertl commented 2 months ago

Running frame_color_channel.json in cts:

grafik

jeffamstutz commented 2 months ago

I added support for changing the color channel format in the viewer (https://github.com/KhronosGroup/ANARI-SDK/pull/232) and haven't been able to reproduce this kind of artifact....could you try out the latest viewer and see if you can reproduce it on your side? I'm starting to wonder if there's an issue with the scene itself, but certainly could be anything.

UX3D-haertl commented 2 months ago

Is there a way to switch between the color channel formats in the UI or how can I change the format? Maybe there is an issue with the scene, but ospray renders the scene correctly.

johguenther commented 2 months ago

I can reproduce this with cts (yet the tringles are different although using a seed for the random number generator, maybe this is not portable?), but not in the anariViewer (to change the FB format bring up the context menu with double-right-click).

The artifact looks like an overflow from one channel to the other when the float is >1.0 (may be the case with OSPRay as well, just not as pronounced, because it renders much darker).

Indeed, a clamp is missing here: https://github.com/KhronosGroup/ANARI-SDK/blob/next_release/cts/src/SceneGenerator.cpp#L1055-L1059

jeffamstutz commented 2 months ago

Turns out it was a bug in how colors were accumulated between volume/surface/background. Should be fixed in #234.