Andrej730
(Andrej730)
March 2, 2023, 7:24pm
1
Anyone managed to reproduce Creating a Volumetric Ray Marcher (shaderbits.com) in unreal engine 5.1? Trying to recreate this shader to study how volumetric clouds work.
Where do I put this part of the code?
After this step:
The shader works in shader and shader instance viewport but just doesn’t work in actual viewport. Any reasons for that?
Does it work when the object is at the world origin and has a scale of 1?
1 Like
Andrej730
(Andrej730)
March 8, 2023, 9:35am
3
It worked, thank you! Any idea what to change to make it work in the local coordinates instead of local?
The next section of code on the blog starts with the following comment
//bring vectors into local space to support object transforms
So if you haven’t implemented that yet, you’ll want to review it as it seems this will have your answer.
Andrej730
(Andrej730)
March 9, 2023, 9:03am
5
This code actually results in the shader only working in world coordinates
jahjah771
(jahjah771)
March 9, 2023, 10:11am
6
Enable volumetrics plugin-> check plugin folder → find this shader. Problem is lwctofloat conversion (ue5 lwc feature), as you will find out from this plugin.
1 Like
Andrej730
(Andrej730)
March 10, 2023, 4:47pm
7
It worked, thank you!
The problem was that I was using LWCToFloat3x3
with GetPrimitiveData(Parameters).WorldToLocal
instead of LWCToFloat
and I guess it was discarding translation bit
2 Likes