deniz Posted June 3, 2011 Share Posted June 3, 2011 Hi everyone, is it possible to render to an offscreen render target (color buffer) using RenderFramework() command? without this I have to render to the back-buffer, perform a buffer copy operation to render reflections in a mirror with effects. I want to avoid that extra copy and also I want to be able to change the resolution of the color buffer as well.. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 3, 2011 Share Posted June 3, 2011 Just do SetBuffer(your128x128buffer) before RenderFramework(), and of course SetBuffer(BackBuffer()) after that. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Josh Posted June 3, 2011 Share Posted June 3, 2011 Certainly, but I don't recommend rendering to an extra image like a mirror with full effects enabled, since it will be much slower. I'd use minimum rendering, as demonstrated in the beginning tutorial, with shadows disabled. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
deniz Posted June 6, 2011 Author Share Posted June 6, 2011 Just do SetBuffer(your128x128buffer) before RenderFramework(), and of course SetBuffer(BackBuffer()) after that. ok thanks, that worked.. it did not work before, may be I was doing something wrong. Quote Link to comment Share on other sites More sharing options...
deniz Posted June 6, 2011 Author Share Posted June 6, 2011 Certainly, but I don't recommend rendering to an extra image like a mirror with full effects enabled, since it will be much slower. I'd use minimum rendering, as demonstrated in the beginning tutorial, with shadows disabled. I see.. I tried to do that by disabling all effects calling SetSSAO(0); SetHDR(0); etc. but everytime I toggle the effects before and after calling RenderFramework(), a very very huge performance drop occurs (I get less than 1 fps) I guess LE is trying to reload &/ reinitialize all related stuff (like shaders etc.) and this causes a huge performance drop. if I try to use Renderworld() then I get another set of problems: I cannot see the sky box, where there is a sun whose motion is determined by a Lua script. (it is essentially the day-night script from one of the users' posts here in this forum, modified by my colleague to suit our needs). I also see strange trails of rendered images from previous frames. any clues how to overcome this? Quote Link to comment Share on other sites More sharing options...
deniz Posted June 15, 2011 Author Share Posted June 15, 2011 Just do SetBuffer(your128x128buffer) before RenderFramework(), and of course SetBuffer(BackBuffer()) after that. setting the buffer size to any size other than the back-buffer size seems to be problematic. I get strange visual artifacts: whole screen becomes white and then the screen freezes. any ideas? Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 16, 2011 Share Posted June 16, 2011 Framework is checking and deleting and recreating lots of stuff if they have changed since the last call to RenderFramework(), so this is probably why using a smaller buffer will cause also problems, since Framework doesn't fully handle the buffer change. I am using always the raw RenderWorld() command for extra buffers like mirrors, realtime cubemaps, rifle scopes, water and radar maps, since then Framework is not disturbed with constant buffer changes. It's more work to have all effects using RenderWorld(), but like Josh said, you don't even want all effects in those small extra buffers. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Josh Posted June 16, 2011 Share Posted June 16, 2011 Yes, it's not meant to be used multiple times with different resolution buffers or different settings. If you change settings it will have to recreate buffers twice each frame. Use regular plain rendering with just lighting, no shadows, for your low-res reflection passes. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
deniz Posted June 24, 2011 Author Share Posted June 24, 2011 Yes, it's not meant to be used multiple times with different resolution buffers or different settings. If you change settings it will have to recreate buffers twice each frame. Use regular plain rendering with just lighting, no shadows, for your low-res reflection passes. ok I get it. But some script-based effects do not work with renderworld() command. we have a day-night script that cannot be seen when using renderworld but is visible with renderframework. how can I make that script visible with renderworld? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.