Godot Engine

Godot Engine

Fisheye Distortion Vertex Shader
3
   
Award
Favorite
Favorited
Unfavorite
Download
"Made a vertex shader capable of achieving a fisheye lens effect (Inspired by Hyper Demon). My previous way of doing this required a cubemap of cameras and had quite a lot of overhead. This experiment only requires one camera and is fast but may end up being more limited. We'll see."
2 Comments
Cobalt_Afterlife  [author] 13 Feb, 2024 @ 8:31pm 
Panini just doesn't have the look that I want. I very much like the spherical fisheye look. In terms of "quality", it can be kind of tricky because I'm doing all of this in the vertex shader and I have to clip some verts that would stretch around the sides of the screen. I have a plan for ways to improve but since I'm pretty new to vertex shaders in general it might take some trying and failing until I get the look I want. I made a similar fisheye effect a few months ago that uses the fragment shader to manipulate the image in screen space. That one looks much better and fills the entire screen since its easy to do over-rendering without worrying about vertices stretching in weird ways.
GARLIC OF DOGS 13 Feb, 2024 @ 3:39pm 
The Panini Projection effect is very similar to what you are doing. This may help with the FOV quality.