so, i've been cursing at this all evening, and googling and asking around has got me well on my way to the result I want but i'm still bugged by a giant problem.
the result i'm trying to get here, is a fisheye effect, but only on the edges. sort of a vignette-masked distortion, if you will
a short explanation of how this shader works:
i use the screen size and screen pos nodes to calculate the distance of a pixel to the screen's center. this results in a vignette-like vector2 with a white center and grading outwards. I mask this texture using a regular gradient to be able to only use it on the edges of the screen, and then I add that final result to the texture coordinate node, and that result goes into the UV's of the scene texture sample, which goes into the emissive node of the material.
the problem i'm having can be seen in the second image.
I know where the problem is coming from:
by adding a value to the UV's, i'm basically offsetting them.
the problem is that I don't know how to fix this.
i'm guessing the calculation went wrong somewhere and this is the result of that, if so, i would very much appreciate some help
thanks in advance
Replies
i tested that, but it doesn't change a lot. it only changes the screen's supposed center, but not the final result, or the offset problem
that gets the weirdest result; the scene is so distorted it's not recognizeable anymore, as essentially you're distorting it more towards the center and less towards the outside.
the texcoord node is there to have a scene to distort, basically, so that's not a option
i might be going about this the entirely wrong way though, i just want a fish eye effect, so if anyone's got a better/easier option to do that, i'm open to suggestions
i've tried it with a spherical normal map, but the compression's killing it, so there's another problem i'm dealing with... again, 'im open to any suggestions
Also, to get rid of the compression, I suggest importing your Normal Map as a TC_NormalMap compression, then switch it to a VectorDisplacment compression.