Hi,
so I try to use the RayMarcher, which is shown in [here][1].
I use the basic code from the first sample (opacity only).
The only difference is, that I don’t use a 2D Flipbook, but a real Volume Texture which is available sind 4.20 (You can create it from a flipbook, but I also implemented a Factory which imports my raw 3D data, both methods show this bug). When using his flipbook approach, everything is fine. But when I use the Volume Texture I get weird artifacts.
Here is the custom Material Node Code which I use to compute the Emissive Color:
float accumdist = 0;
float3 localCamVec = normalize(mul(Parameters.CameraVector, Primitive.WorldToLocal));
float StepSize = 1 / MaxSteps;
for(int i = 0; i < MaxSteps; i++)
{
float3 satPos = saturate(CurPos);
float curSample = Tex.SampleLevel(TexSampler, satPos, 0).r;
accumdist += curSample * StepSize;
CurPos += -localCamVec * StepSize;
}
return accumdist;
CurPos is BoundingBoxBased_0-1_UVW.
The following artifact is visible:
You can see the stripes which are emitting from the ball.
Another one from the side:
I used Opaque instead of Additive blending so you can see it better. It also goes in the depth.
I have no idea what is wrong since it works with the flipbook. I think maybe it is a bug with Sampling of the new Volume Textures? This also occurs with different Volume Textures.