Patrefans
shaunjs from patreon
shaunjs patreon

Dynamic Lights & Shadows - Devlog

🕑 Added 2021-11-30 14:58:04 +0000 UTC
Dynamic Lights & Shadows - Devlog

Comments

Hi! There's a link in the post :) edit: I notice this isn't working, oops. Will sort this out tomorrow

the yes

hi just joined, where can i find the code?

Hey sorry for missing this! I haven't looked into moving entities yet but I have a reasonably good idea of how I'll approach it (just passing an x/y offset value to the shader). I do remember there being a few nuances with getting the moving camera to work as I needed to pass some other bits to the shader (see the one line shader in the video, i think it has some camPos variables involved?) The tricky thing then with anything involving a surface and a moving camera is you need to subtract the position of the camera from the position of anything you want to draw to the surface, so that it ends up in the right place (as 0,0 on your surface is equal to the x/y position of the camera in the room)

thanks for the video! Helped a lot. I had a couple questions: I'm having trouble implementing this with a camera system unless I draw a surface the size of the whole room. And have you worked out a solution for moving Entities?


More Creators