[open/new] OpenGLDriver > TargetTexture/FBO & Stencil Buffer

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Squareys
Posts: 18
Joined: Tue Mar 11, 2014 8:09 pm
Location: Konstanz, Germany

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by Squareys »

Oh, well, maybe we can push that through...

Packed Renderbuffer is definitely possible, since that's how I got that to work. Packed Texture2D Attachments might not be, though.

I'm still very confused: What are the advantages of Texture2D attachmens over Renderbuffers?
Last edited by Squareys on Thu Mar 13, 2014 7:36 pm, edited 1 time in total.
Squareys @ facebook > https://www.facebook.com/Squareys
Squareys @ twitter > https://twitter.com/squareys

VhiteRabbit @ facebook > https://facebook.com/vhiterabbit
VhiteRabbit @ twitter > https://twitter.com/vhiterabbitvr
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by Nadro »

You can't use renderbuffer as a standard texture2D, so you are not able to sampling it in GLSL for example. Anyway fbo with renderbuffer may offer better performance on some mobile GPUs.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by hendu »

Packed DS textures were made core in GL 3.0, before that they were a widely implemented GL 1.2 extension.
Squareys
Posts: 18
Joined: Tue Mar 11, 2014 8:09 pm
Location: Konstanz, Germany

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by Squareys »

Okay, thanks.


@hendu: How do you know all this version stuff. I tried googling stuff like that, but I found it rather hard to find. :)
I will try your patch tomorrow. If it still works, I will try to draw some attention to it on sourceforge.
Last edited by Squareys on Fri Mar 14, 2014 3:17 pm, edited 1 time in total.
Squareys @ facebook > https://www.facebook.com/Squareys
Squareys @ twitter > https://twitter.com/squareys

VhiteRabbit @ facebook > https://facebook.com/vhiterabbit
VhiteRabbit @ twitter > https://twitter.com/vhiterabbitvr
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by hendu »

I googled it, as if I could remember the GL spec :P
Squareys
Posts: 18
Joined: Tue Mar 11, 2014 8:09 pm
Location: Konstanz, Germany

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by Squareys »

@hendu: I updated your patch for the current revision and added it to your ticket on sourceforge. Let's hope this get's through, it actually works perfectly :)
Squareys @ facebook > https://www.facebook.com/Squareys
Squareys @ twitter > https://twitter.com/squareys

VhiteRabbit @ facebook > https://facebook.com/vhiterabbit
VhiteRabbit @ twitter > https://twitter.com/vhiterabbitvr
denzelbro
Posts: 50
Joined: Wed Jun 27, 2018 11:53 pm

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by denzelbro »

I am using 1.7 and currently having problems related to this issue with stencil buffer. would be interested in getting some tips or guide for a workaround or any fix to make them both work.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by devsh »

IrrlichtBAW supports explicit choice of renderbuffer or texture as an FBO depth and/or stencil attachment. It also allows you to use depth only format, stencil only format and depth stencil packed format.

The only thing you cannot do is use packed depth stencil texture is when you sample from it in a shader, you can only fetch depth (not because it doesn't want you to, OpenGL prevents it without some obscure extension whose name I cannot remember right now).

Stencil buffer gets used in the routed K OIT implementation in example 16
https://github.com/buildaworldnet/Irrli ... parencyZoo
denzelbro
Posts: 50
Joined: Wed Jun 27, 2018 11:53 pm

Re: [open/new] OpenGLDriver > TargetTexture/FBO & Stencil Bu

Post by denzelbro »

Thanks for the info there devsh, that seems really interesting but I really need to work on good ol' stock irrlicht right now and will just attempt to apply the recent posted patch if I have no other option.
Post Reply