You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

4h 4m 33s logged

I FORGOT TO MAKE A LOG

Okay so for the last 4 hours i’ve been fighting with my shader code as it didnt work for a long time, but it finally works.

What was the issue?

  • when using shaders on pngs, sometimes the edges and transparent areas render weird
  • I thought my code was wrong, but in reality I just had to switch the image type.
  • issue #2 was that the blue circle, which is the lens (had to make it obvious for debugging) was firstly having inverted movement to the actual distortion field, and secondly sometimes just not showing up.
  • to fix the inverted movement, I just mapped the actual circle’s position to the field’s coords. (btw, the inversion was caused by webgl canvas and p5.js canvas having different coordinate systems)
  • to fix it not showing up, that was just a layering issue.

Overall, that 4 hour period was a rollercoaster and i’m glad its over. If you want to see how it broke (I didnt devlog this cause I was too preoccupied) there’s a video devlog on my instagram:

https://www.instagram.com/urged.st/

0
2

Comments 0

No comments yet. Be the first!