Framebuffer with hdri & different shaders

Im using the docking branch and ImGUI with opengl backend. I am rendering opengl into a framebuffer and then add this to ImGui::Image, works pretty nice:

enter image description here

uint64_t textureID = mFrameBuffer->get_texture();
// I know reinterpret_cast is evil - better solution?
ImGui::Image(reinterpret_cast<void*>(textureID), ImVec2{ mSize.x, mSize.y }, ImVec2{ 0, 1 }, ImVec2{ 1, 0 });

I use a simple directional light fragment shader.

My question is: If I want to lighten the scene with an hdri (different shader), how can I combine this with the framebuffer? Does someone has an example or can tell me the basic steps, just to be on the right track.

Thx in advance! Jay



Read more here: https://stackoverflow.com/questions/66321132/framebuffer-with-hdri-different-shaders

Content Attribution

This content was originally published by Jayanam at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: