Cheap round-edged box (vertex shader)

image image

envMap projection breaks on faces not aligned with camera directional axis, much like what happens on my texture projection question.

edit: Oh, I know why.
The same thing happens on every envMap. You just can’t notice on @prisoner849’s example because the number of segments on each face of the box is a lot higher, so the effect is less noticeable. But if you test the same thing on a regular boxGeometry with just 2 faces on each side, you get the same distortion.

The way to fix that is by calculating the texture UV projection inside the fragmentShader using interpolated worldcoordinates, but that should add a really big overhead, not sure if it’s worth.