Hey Everyone,
I have a question concerning framebuffers, textures and shaders and if I can get some help here that would be awesome!
So what I want to do is render my scene to a texture the size of my window, and then use that texture to render to the actual window by passing it into my fragment shader and using gl_FragCoord.x/width and gl_FragCoord.y/height as the texture u,v coordinates.
I don’t quite know whats going wrong with my code though. When I try to reuse the texture to draw to the window it comes out completely wrong.
Here is my code. It may be a little long but if you have the patience to read it it would help me out a lot! There are 3 parts. a) Setting texture and framebuffer. b) Rendering to framebuffer c) Passing texture into shader to render.
Edit: I tried posting my code here but it wouldn’t let me post. If anyone knows how to post code let me know that as well haha.