Replicating the Minecraft Acid Mod

Hi! I’m curious to know how this effect was achieved.

I’ve had a look into projection matricies and post-processing effects, and I wondered if this could perhaps be how this was achieved.

It seems to have an ever-changing screen-space distortion map which affects items based on their distance, I thought might be a more complicated projection matrix, if such a thing exists.
They claim to use a shader on their video, but that doesn’t make sense to me - are shaders not material specific? This seems to work on the entire world.

Can anyone shed any light?

It is done with a GLSL shader, as stated in the link in the video description.

Note that “shader” can have slightly different meanings in different contexts - in Unity, “Shaders” are implemented through materials, which are then attached to individual gameobjects to define how they should be drawn to the screen. A “shader” in the general sense is a program executed on the graphics card to determine what pixel values should be displayed on the screen - they can apply to individual objects, parts of a scene, or the full world. Unity’s “Image Effects” are basically just types of shader that affect the entire scene (rendered to a texture) rather than just objects in the scene.
To make it more confusing, “Shaders” themselves are composed of one or more “Subshaders”, which in turn contain a “Pixel Shader”, “Fragment Shader”, or “Surface Shader”. It’s not exactly the best nomenclature in the world :slight_smile:

The particular shader used here looks to use a vertex modifier that uses a sinewave distortion over time multiplied by the distance to the vertex in x/z planes calculated in view space. It would certainly be possible to recreate this effect in Unity.