ourvice Posted October 25, 2018 Author Share Posted October 25, 2018 2 hours ago, Exca said: I updated the fiddle to use another method for calculation of the implosion/explosion https://jsfiddle.net/6f5Lydot/1/ to make it a bit clearer for me as the one in shadertoy does things a lot differently how I usually do. That should produce uniform changes to center no matter what resolution the renderer is. Changing the formulas used in bulge & implosion can be used to change the look of the effect. [Edit] Also updated the pixi to latest. you are awesome yeah i can get it centering pretty well when i remove : vec2 m = vec2(0.5, 0.5 /prop); //center coords /prop the / prop bit the original code in shader then multiplied it in the last to lines to the uv. vec3 col = texture2D(uSampler, vec2(uv.x, -uv.y * prop)).xyz;//Second part of cheat //for round effect, not elliptical fragColor = vec4(col, 1.0); My feeling is this is what gives it the edge flying past effect present in the shadertoy code ( when the fish eye is in ) and would, also ensure the roundness of the fisheye... https://www.shadertoy.com/view/4s2GRR Your thoughts? Thanks for the help btw, I starting to get the shader language a little better Awesome! Quote Link to comment Share on other sites More sharing options...
ourvice Posted October 25, 2018 Author Share Posted October 25, 2018 still trying to figure out how to get more of a circular indent in the lens instead of an elliptical buldge / indent... but running smooth as butter in the context of the app performance wise Quote Link to comment Share on other sites More sharing options...
ourvice Posted October 26, 2018 Author Share Posted October 26, 2018 float bind;//radius of 1:1 effect if (power > 0.0) bind = sqrt(dot(m, m));//stick to corners else {if (prop < 1.0) bind = m.x-0.3; else bind = m.y-0.3;}//stick to borders if you offset m vec2 slightly I get the effect i was after which is nice it in sense forces a spherical and push the peripheral pixels past the viewer. thank you all for the help, this was fun Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.