xverse-engine / XV3DGS-UEPlugin

A Unreal Engine 5 (UE5) based plugin aiming to provide real-time visulization, management, editing, and scalable hybrid rendering of Guassian Splatting model.
Apache License 2.0
441 stars 65 forks source link

Fixed hardware ray tracing issue #32

Open pixelpunk-DE opened 2 months ago

pixelpunk-DE commented 2 months ago

fixes xverse-engine/XV3DGS-UEPlugin #31

In the custom material function discard was changed to alpha = 0.0f. Because discard does not seem to be supported in HW ray tracing.

bell-one commented 1 month ago

Hello pixelpunk,

I have issue with my unreal 5.2 with hardware raytracing and I tried your commit with two binary files chang but it doesn't show any different with my project,

Is there anything for me to do more then changing M_GS_relight.uasset / M_GS_unlit.uasset in plugins?

pixelpunk-DE commented 1 month ago

Yes, that's all that changed. On both materials it should change in this custom node: image

from discard to alpha = 0.0f;

Which errors do you have in the shader of the original branch?

Ben-Garcia-DB-Solutions commented 2 weeks ago

Implimenting this fix also works for me. Although I found I have the edit

  if (power > 0.0f)
        discard;

to be

if (power > 0.0f)
        return 0.0f;

to get rid of errors. I think this is the correct adjustment but I don't know HLSL at all so not committing it!

pixelpunk-DE commented 2 weeks ago

Yes. I am not an HLSL expert myself. But as far as I understand is that the discard operation is a rasterize operation, which is not supported in SM5+ raytracing. So instead of discarding the pixel, we set it to be transparent. That adds a bit to the shader costs but makes it work with h/w rt.

So please feel free to add it :)