Reliquary - Nintendo SwitchÂ
As a shader engineer for the game Reliquary. I created five PBR triplanar shaders using Amplify to map textures to any terrain. This project was an exciting opportunity for me to demonstrate my skills in shader creation and environmental effects, as well as to contribute to the visual appeal and realism of the game's terrain.
Triplanar / UV free Shader
I created a triplanar shader using Amplify to map textures to terrain. The shader uses a combination of world normal and surface normal to create UV-free texture mapping, allowing it to work on any surface without manual UV mapping. This allowed for seamless texture mapping on irregular terrain, with easy customization options. To blend multiple terrain textures together seamlessly, I implemented vertex painting within the shader. This technique allowed level designer to paint the different textures onto the terrain, providing a smooth transition between textures at the borders.
Demo Terrain Painting
However, creating a triplanar projection caused a problem with the tangents, which are used to map normal maps on the object. I modified every normal map projected on the object to create the correct result.
Without normal correction
With normal correction
Rain and Snow Effects
For the rain effect, I used a flipbook animation that added distortion to the normal map to create the appearance of raindrops falling. The rain effect added an extra level of detail and immersion to the terrain and gave players a more realistic experience.
The snow effect was created by utilizing the existing normal texture to create the refraction of snow, where deeper areas had more saturation. This created a realistic snow effect that added depth to the terrain and contributed to the game's overall visual appeal.
Optimization for Nintendo Switch
One of the biggest challenges in game development is optimizing visual quality for different platforms. To ensure that the terrain textures were efficient and worked seamlessly on Nintendo Switch, I made several key optimizations. For example, I reduced the contrast calculation from an exponential of power function to a remap operation, which provided nearly the same visual effect while increasing efficiency. Additionally, I utilized techniques such as texture packing, which allowed me to reduce the number of textures to be loaded which improve the memory usage and texture sampling.
blend_value = (height - remapVal) / (1 - remapVal);
remapVal [0.0 - 0.99]
blend_value = pow(height , exponentials)
In conclusion, this project was an excellent opportunity for me to demonstrate my skills in shader creation and environmental effects. The combination of the UV-free or triplanar texture mapping, the rain effect, the snow effect, and the glow effect created visually stunning shaders that added depth and realism to the terrain. The optimization for the Nintendo Switch allowed the game to run smoothly without compromising the visual quality. I am proud of what I accomplished in this project, and I believe that my contribution will enhance the game's overall appeal and gameplay experience.