Why Does Post-Processing Material Scale with Camera Position?

Using some debug nodes, I found that the Object Position stays fixed at a value on (0, 1, 0). I’m not sure what it’s derived from, but it stays fixed, which is useful as an anchor value.

I found that I can stabilise the value coming out of the Distance node, if I use a Component Mask on the Green channel (Y-axis) on the Object and Camera Positions before they go into the Distance node.

I’m still figuring out how to use this, but dividing it to bring the resulting value into the 0,0-1,0 range is showing some promise. It also seems to increase with a steady 0,01 (after the division) each time I move the editor camera. I want to see if I can use this as a fixed value (or derived from the line thickness) to increase or decrease the Sine Period (thickness of the line).

1 Like

This is the value that I get from the debug. Still thinking on how I can convert it to a useful scalar value that I can plug into the Sine period.

UE5.2-PPM-Issue-02-CMP

2 Likes

Maybe (1/value)

Im here becouse I have a similar problem but with thick outlines(that are realy in the mesh) but dividing like that sometimes work