Creating a line trace GPU raytraced compute shader - Follow Up

This question was created in reference to: [Creating a line trace GPU raytraced compute shader - Follow [Content removed]

Hi - just a follow up on this as managed to resolve this.

So the issue with line trace not behaving consistently was due to the fact that the coordinates need to take into account the location of the camera - so whilst one might think that a Compute Shader Inline Raytrace would work in a similar way to the typical Unreal line trace CPU function, the actual engine’s camera location needs to be provided as a translation vector to get everything working in the same coordinate system.

It now works very nicely with 1M+ line traces processed in a fraction of the time on the GPU!

[Attachment Removed]

Hi David,

Glad to hear you got things working now. I will leave your reply as the best answer, so that folks with the same issue can quickly reference your solution.

Have a good weekend,

Tim

[Attachment Removed]