Multiple Render Targets support

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Multiple Render Targets support

Post by Nadro »

Hi all,
If You need support for Multiple Render Targets in Irrlicht You can download a patch from:
http://nadro.net46.net/Patches/irrlicht ... port.patch

[This is edited topic about FP RTT and MRTs support]
Last edited by Nadro on Sun May 31, 2009 10:09 pm, edited 2 times in total.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Thanks, again.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

awesome, nadro.

thanks for the hard work.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

is it possible if someone can patch version 1.4 with this one. i'll post it up on my sourceforge account. i'll bump the version to 1.4.1
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Thanks dlangdev and BlindSide. I'm downloading new copy of newest Irrlicht from SVN and I will do test for properly of my code with this version today (+ patch for large Render Target Textures in DX9) bacause I can't tested this code yesterday. I think than I can release code as patch for Irrlicht, after test :)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

cool, i have an idea.

i could volunteer setting up a patched version of irrlicht 1.4 on my sourceforge account.

i'll set up the svn and give you access to it. you can apply any patch you like there and i'll be able to download and test it with my demo programs.

this patched version will be used as a collection for all code contributions made in this forum. i think we'll be able to collect a good number of features rolled-into version 1.4 going to 1.4.99999, ad infinitum, ad nauseam--1.4.9999999999.

nadro, send me your sourceforge login name and i'll make an access account to the svn repo. you probably might be one initializing the repository if i can't initialize it, i have a day job (writing server side code) and will only be able to work on it after office hours. but you're rest assured, i will put a lot of hours into testing your patched code.

i found the doc for importing source code to svn...

http://svnbook.red-bean.com/en/1.1/ch03 ... 3-sect-7.3
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

OK, I can build version for Irrlicht 1.4 and for Yours Irrlicht 1.4.1 via SVN :) All informations all send to You tomorrow.

Code it's clear and ok only You have to improve section "//! ColorFrameBuffer" - constructor in COpenGLTexture.h :)

For Irrlicht SVN version 1146 I done patch with:
-MRTs for DirectX9 and OpenGL
-Floating Point Textures for DirectX9 and OpenGL
-ATI Radeon FBO Patch for render textures larger than the screen
-Render Target Textures, larger than the screen for DirectX9 created by vi-wer (Thanks vi-wer for excellent patch :) link to topic: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=24255)

You can download patches (first for patch Irrlicht include, and second for Irrlicht source) from:
http://chernobylstudio.com/download/nad ... lude.patch
http://chernobylstudio.com/download/nad ... urce.patch

Patches are tested and all works 100% properly!!! :) I will release IrrCg version with support this features and include Shadow Mapping and MRTs demos :)
Last edited by Nadro on Sat Jun 07, 2008 7:48 pm, edited 1 time in total.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

hey nadro, that was quick.

this is the patch you ran against the svn version? it sounds like that's the one you did. i'll do the same thing here as well.

thanks for the hard work.

be well.
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Yes :)
OK, I tested this code with Linux and all works properly!!! I found small error in my code .

You have to replace in COpenGLExtensionHandler.cpp in:

Code: Select all

pGlDrawBuffers = (PFNGLBINDFRAMEBUFFEREXTPROC)

IRR_OGL_LOAD_EXTENSION(reinterpret_cast<const GLubyte*>("glDrawBuffers"));
(PFNGLBINDFRAMEBUFFEREXTPROC) to (PFNGLDRAWBUFFERSPROC)

After improve this all ot's ok :) If this code work properly on Linux, so this is good for MacOSX ;) but I can't test this code on MacOSX because I don't have them :)

Now code is clean and full compatible with Irrlicht :) No memory leakes etc.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

I prebuilded MRTs + Floating Point Textures patch for Irrlicht Rev 1361 and new version of Vi-wer large RTT textures for DirectX. Patch require 2 files: CD3D9DepthResizer.cpp and CD3D9DepthResizer.h from:
http://irrlicht.sourceforge.net/phpBB2/ ... 5&start=15
(Patch add automatic all required modification in CD3D9Driver files for large RTT in DirectX, so You needn't add in manualy). In this modification is apply patch for ATI FBO BUGFIX (this modificated FBO is faster about 40% than standard Irrlicht FBO). Topic about this bugfix:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25469
Patch is build only for OpenGL and Diretct3D9, so You should disable other video modes in IrrCompileConfig.h You can download it from:
* Irrlicht Include patch
http://nadro.byethost16.com/Patches/MRT ... lude.patch
* Irrlicht Source patch
http://nadro.byethost16.com/Patches/MRT ... urce.patch

Patch is 100% compatible with Windows and Linux (other platforms are untested, but should work properly). All this features was tested by me and all works ok.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

damn I love polocks.
elena

Post by elena »

Nadro great work, thank you. But what about solaris platform?
Last edited by elena on Thu Apr 08, 2010 11:52 am, edited 1 time in total.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Solaris use Linux type extension handler? So this code should properly working with Solaris platform also. But are this features support by the Solaris Open-Source NVIDIA and AMD-ATI drivers?
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

I'm wondering that if after all the modifications that have been done to the engine, would these patches still work?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

FP textures patch need some modification to working with current SVN version, but if You need only MRTs from it, patch is avaiable on Irrlicht patch tracker (it's probably compatible with current SVN or eventually need only minor, cosmetics improvments)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply