Recreating an Animal Crossing-esque world deforming shader

Godot Version

v4.2.stable.mono.official [46dc27791]


I’m looking into developing a life sim game, and I would like to create a world deform shader similar to the one in Animal Crossing.

The effect looks like this:

The world curves around a tube, allowing the user to see the sky, even though the camera is positioned at a bird’s eye view.

I am familiar with the basic logic behind it.

The mesh is deformed based on camera depth, and later games have added fog to make the deformed meshes appear as silhouettes in the far distance too.

My question is about the practical execution of this concept.

I was thinking about having a general World Node3d, that has all of the furniture, foliage, and general environment as its children.


Where would I apply the deform shader, and what kind of shader should I be looking into?

Techniques, keywords, and general words of advice would be very appreciated.

This shader would be applied in the vertex shader of all your objects. This means you will have to use a custom shader for everything.

You’ll need to lower the Y value based on distance on the camera’s local Z axis.

You can evaluate the distance on the camera Z by transforming the vertex into view space and applying the transformation in world space. You can use vert_world_coord to get the vertex directly in world position.

1 Like