Advertisement

OpenGL ES Framebuffer switching vs textures, shaders bound + GI questions

Started by June 13, 2020 05:25 AM
0 comments, last by _WeirdCat_ 4 years, 7 months ago

Im making omnidirectional shadowmapping i encountered few issues that i am not aware of, that is:

Whenever i bind program (shader) and switch between framebuffer is.this shader still in use or do i have to bind it again?

Same goes for textures if i bind them in one framebuffer do they stay bound and i can use them in another framebufder or do i have to bind them again after switchig framebuffers? ( I know i could test that, but im writing new lighting model and for now im just coding)

Another question is how would i store some basic light data in a 3d texture,.for sake of simplicity let it be just whenever there is shadow or not. So basically i have rendered the scene with lights and shadows, but i woukd like somehow to store that in 3d texture, now only thing that comes in mind is that i should divide geometry in a regions that actually ill be seeing and then render each regiin 6 times and store light data into 3d texture?

And how would i fill every height layer etc.

However that seems way too wrong, not to mention i want a full dynamic lighting.

This topic is closed to new replies.

Advertisement