   GLSL screenspace effect
  Hi,I am developing a screen-space effect in GLSL using RenderMonkey. Say for example I want to add a simple glow to an object. What I would like to do, somehow:1. Render my object to a texture, with the same size as my viewport2. Blur the texture to a second texture to produce a glow3. Add the blur to the original texture, and render to exacly the same spot on my viewport.Somehow, I can't accomplish this. Rendering to a texture with the size of a viewport seems to be the solution, but I haven't been able to align these textures (1 and 2) properly. RenderMonkey seems to use The examples provided with RenderMonky all seem to render the scene to  a small (512 x 512) texture, and use the final texture to render to the viewport. This results in low-quality renders, and they aspect-ratio of the viewport is totally ignored. Can somebody point me into the right direction?[Edited by - Ziggy Stardust on June 12, 2006 11:39:57 PM]
  hang on to yourselfQuote:to render the scene to a small (512 x 512) textureu should use a texture the same aspect as the viewpoint eg i use one 1/4 the size ie 1024x768 i use 512x384 (texture_rectangle)Quote:3. Add the blur to the original texture, and render to exacly the same spot on my viewport.u dont combine it with the original texture what u do is just draw a fullscreen quad blended over the tyop of the scene with that texture (u will need to change the glMatrixMode( GL_PROJECTION + MODEL_VIEW ) matrices   ;  Thanks zedzeek!That was what I was looking for. Somehow I missed the fact that RenderMonkey can render to the screen, and then to a texture.I will try this.Ziggy   ;  Euhm I tried that before as well, I just didnt manage to get the texture the same size as the viewport lol... (Works fine with putting a normal texture fullscreen, but when it was edited by copyteximage2d, the texture wasn't stretched correctly. Soz a bit offtopic but worth mentioning ;)   