What do MRT actually do???

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

What do MRT actually do???

Post by devsh »

hey i have done a couple of effects and they really do take up rendering time, first is depth of field which really requires to draw everything again using a shadow material. This takes as much time as rendring everything again, even thought it is from the same angle.

What do MRT actually do??

can i render simultaneously into two RTTs using different materials???

Does instancing work under OpenGL???

how could i use it ???

Or least speed enchancing method, is there any function which would render a whole scene using one material???

so i do not have to store all materials in an array and assign the depth material, render the node and assign back all the materials from the array.

Is the irr::Array slowing me down???
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

anyone this is really important!!!
psychophoniac
Posts: 101
Joined: Wed Dec 03, 2008 5:33 pm
Location: ger

Post by psychophoniac »

http://en.lmgtfy.com/?q=multiple+render+target

and be patient, you did not even wait a day for an answer.
i love skateboarding!
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

With MRTs, You can write different color informations to other RTT in one render pass, eg: COLOR0, COLOR1, COLOR2 in Cg/HLSL sementics.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

are you sure your IQ is 159 !?!?! :shock:
I mean with such an high IQ you should be able to use a search engine !!! :twisted:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

ok but how would i go on applying it to the depth pass???

do i have to make a shader or something??
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

in order to access the depth pass you have to download the internet.

www.google.com

PLEASE.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

no i mean to order to render to mutliple targets with different outputs (colors and stuff) do i have to use a shader???

so lets say i set up 2 RTs

in GLSL does the built in variable gl_Color determine the color of the pixel on the RT and does the i symbolise the RT.

so in standard shader i write gl_Color[0] = x;

so if i had two RTTs, could i use

gl_Color[0] = normal render
gl_Color[1] = depth pass

???
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

You can check my Deferred Shading example (Cg shaders):
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=28965
This demo use MRTs.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

MRT in OpenGL and GLSL posssible????

hey and btw on the array gl_FragCoord???

could i invert or translate them along some axis and get a "mirrored" vertex transormed image render and render that into a let's say third RTT. So i wouldn't have to render the whole scene again from a translated camera angle for my water node...

I think obviously some object could get occluded by frustrum culling.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This is fragment shader, you cannot combine multiple vertex shaders within one MRT call.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

i'm giving a try to nadro's update for FPT and MRT so far so good.
9YkKsvXM
Posts: 64
Joined: Tue Mar 11, 2008 11:45 pm

Post by 9YkKsvXM »

-
Last edited by 9YkKsvXM on Mon Jun 08, 2020 1:23 am, edited 1 time in total.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

i seem to have a problem

COpenGLDriver.cpp:2863: error: ‘class irr::video::COpenGLTexture’ has no member named ‘unbindFrameBufferObject’
COpenGLDriver.cpp:2881: error: ‘class irr::video::COpenGLTexture’ has no member named ‘bindFrameBufferObject’
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

My patch for FP textures is very old and first You have to update it to compatible with the latest Irrlicht version.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply