Posted November 26, 2025 by Virtual Turtle Games
#design #update #shader #outline
This week I ran into an interesting design challenge. The artstyle of my game heavily relies on a screen space outlines, based on this amazing shader by Robinseibold. This base shader works very well with some tweaking of the settings, but it has one drawback: detailed meshes in the distance will appear as one thick blob of outline, which doesn’t look great.
I ran into this issue as I started working on the outlook point area, which can be seen from the main ranger building:
As you can see, seen from the ranger station, the radio tower appears as a yellow blob:
My first solution was to completely fade out the outline color after a certain distance, but that wasn’t ideal either, as the tower would essentially be invisible due to my fog-like rendering. I wanted this tower to be visible, but not take all the attention away from the scene.
My second solution I liked much better. After a certain distance away from the camera, I start fading the original outline color into a secondary outline color, one that is black and pretty transparent. This way it creates a nice silhouette of the object, whilst still being visible in the distance! Here is how that looks:
I’m pretty happy with it, it definitely looks better than before, although it’s not perfect. One think I don’t like is that when viewing the ranger station from the lookout point, it’s half outlined and half dark, which doesn’t look great.
I’ll have to play around with the distance parameters some more, but for now this will do!