# Using a custom intersection shader for Ray Tracing?

**URL:** <https://forums.unrealengine.com/t/using-a-custom-intersection-shader-for-ray-tracing/466987>\
**Category:** Rendering\
**Tags:** procedural-geometry, Raytracing, unreal-engine, Rendering, question\
**Created:** [June 19, 2020, 7:38pm UTC](https://forums.unrealengine.com/t/using-a-custom-intersection-shader-for-ray-tracing/466987 "2020-06-19T19:38:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e709748a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e709748a1](https://forums.unrealengine.com/u/anonymous_user_e709748a1)\
**Post date:** [June 19, 2020, 7:38pm UTC](https://forums.unrealengine.com/t/using-a-custom-intersection-shader-for-ray-tracing/466987/1 "2020-06-19T19:38:44Z")

</div>

I want to render procedural geometry with raytracing. I implemented a straight forward glsl raymarcher that renders my SDF based fractal with some satisfaction ([like this](http://glslsandbox.com/e#23658)), but I want shadows, AO, GI, all the juicy stuff. I have an RTX card and want to utilise the hardware accelerated raytracing features.

UE 4.23 release notes include the line

> New: Added support for Procedural Geometries and intersection shaders in Ray Tracing.

How would I go about utilising this support for Procedural Geometries / intersection shaders in Ray Tracing? Is it available somewhere within the 4.25 release, or do I need to fork the codebase and hack together my own thing? I’m prepared to do either, but any pointers where could I start working from?

---

<div class="post-metadata">

**Author:** ![Mataleone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mataleone/32/741028_2.png) [@Mataleone](https://forums.unrealengine.com/u/Mataleone)\
**Post date:** [January 23, 2021, 4:17am UTC](https://forums.unrealengine.com/t/using-a-custom-intersection-shader-for-ray-tracing/466987/2 "2021-01-23T04:17:01Z")

</div>

I’m also interested by this.  
Afte reading [this tutorial by Nvidia](https://developer.nvidia.com/rtx/raytracing/dxr/dx12-raytracing-tutorial-part-2), I think we need to provide a RayGen shader, probalby using [FRayTracingPipelineStateInitializer](https://docs.unrealengine.com/en-US/API/Runtime/RHI/FRayTracingPipelineStateInitiali-/index.html), but I have no clue on how to use it.

---

<div class="post-metadata">

**Author:** ![MachinaInfinitum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MachinaInfinitum](https://forums.unrealengine.com/u/MachinaInfinitum)\
**Post date:** [July 2, 2023, 2:59pm UTC](https://forums.unrealengine.com/t/using-a-custom-intersection-shader-for-ray-tracing/466987/3 "2023-07-02T14:59:48Z")

</div>

Any update on this ?
