I’m rendering a Heightmap to a Render Target 2D using the Scene Depth (in Red Channel) of a orthographic Scene Render Component 2D, placed above the important parts of the map.
However, at anything below 4K resolution on the Render Target it gives terrible artifacts for the depth. This is a problem for one, because rendering a 32-bit floating point 4K texture requires like 640MB of VRAM, and two because it doesn’t make sense. I would use 16-bit, but with the scale of my world being at the limit of what Unreal can handle in centimeters, it would result in additional floating point artifacts. I can’t even scale it down using a material, since the Scene Capture Component renders directly to the Render Target, so it has to be 32-bit.
Here is the depth (adjusted for scale) at 1K:
Versus at 4K:
As you can clearly see, the first texture is unacceptable. The second texture has been downsampled to 1K using a simple copy-only material, so the pixel size for both screenshots is the same. In fact, you can see the edges of the pure red area. So this is not a resolution issue, it’s something to do with how the Scene Capture Component 2D is rendering it.
I took those two images within two minutes of each other, the only change being the Render Target resolution.
Any ideas would be appreciated.