I made this small level to recreate the core mechanic of Superliminal (one of my favourite indie games) while also experimenting with post-processing materials. The main concept is that at the end of each level, players pass through a portal that leads to entirely different levels with different aesthetics. In this case, the transition goes from a completely black-and-white room, inspired by Pop Art, back into a colourful fantasy world.
This showcases an effect that makes object outlines visible. It is a post-process material applied at the After Depth of Field Blending stage. The effect works by utilizing the depth buffer and normals. The technique involves shifting the original image by one pixel in multiple directions and subtracting the results to detect edges.
The image showcases the function that updates the render target every frame to accurately display “the other side”. This effect is achieved using a scene component positioned behind the material where the render target is applied, effectively mirroring the player's movement. Additionally, the function checks whether the player is ready to transition by calculating their position and velocity, then comparing them to the position of the mirror scene component. There is also a check to determine if the player is holding an object, if so, the teleport function is disabled.