Depth buffer texture

Started by Thomas., June 30, 2012, 01:58:21 AM

Previous topic - Next topic

EgonOlsen

This never worked...at least on my phone. It always caused to phone to hang, so i gave up on it.

EgonOlsen

#31
Quote from: EgonOlsen on July 04, 2012, 04:19:28 PM
No, wait...this might not be entirely true. I think i'm not using FBOs for render targets in jPCT-AE...most likely because there is no support for it in ES 1.x. I'll look into ES 2.0 again to see if it's supported there...
must...recalibrate...brain...i'm already using render buffers when in OpenGL ES 2.0 mode. I just completely forgot about it. It might be possible to improve render buffer management when using multiple buffers in one frame though. I'll look at it and report back...

Thomas.

Ok, thanks. Now I'm doing UV's for monastery ;)

EgonOlsen

I've updated the jpct_ae.jar. The new version should handle multiple buffers faster and is also able to deal with color=null. Please give it a try.

Thomas.

#34
You do miracles, render depth texture takes 6ms, render scene 4ms (I don't call method renderScene() again), DOF effect 0.3ms :) But fps is 26... Do you know when render thread sleep for vsync? Is it fb.display()?

EgonOlsen

I would expect vsync to kick in after onDrawFrame(). FrameBuffer.display() doesn't do this in jPCT-AE (it does so in the desktop version). The frame switching is solely handled by Android itself. I don't have any influence on that.

Keep in mind that the GPU can delay tasks, i.e. the call may already have returned but the GPU is still drawing things.

EgonOlsen

The jar has been updated again. I've added a static factory method to Texture to create nPot-textures (public static Texture creatNPotTexture(int width, int height, RGBColor col)).

Thomas.

It's working ;) I'm going to look for some optimization...

EgonOlsen

Quote from: Thomas. on July 05, 2012, 10:44:06 PM
It's working ;) I'm going to look for some optimization...
It's time for a screen shot then... ;)

Thomas.

I just save my map and models to OBJ file and export to SER, this afternoon here will be ;)

Thomas.

#40
The most expensive is DOF effect. If I render depth buffer and scene, game running 56fps (from 60), but with applied DOF effect, fps drop down to 23... Now I take 16 samples of surrounding pixels. It is 16.5 million times of reading color from texture. I'll try to reduce this number to minimum.

Here it is, but without textures it is bad...


EgonOlsen

Looks nice. Why are you doing everything without texture btw? I've never seen a screen shot of that game with textures...or have i?

I do understand that the color buffer target has to have screen size, but does the depth buffer target has to have it? Isn't it sufficient to render it at a quarter of the screen resolution and save some fill rate that way?

Thomas.

Before, I'm was lazy to do textures, but if I didn't them immediately, I don't ever :D So, every new model what I do has texture, these models are more than year old. Yes, I'll try it, it'll be definitely faster. And it seems, that anti-aliasing is not applied on the render target...

EgonOlsen

Quote from: Thomas. on July 06, 2012, 08:40:33 PM
And it seems, that anti-aliasing is not applied on the render target...
Yes. Because that's not possible.

Thomas.

#44
Quote from: EgonOlsen on July 06, 2012, 09:58:43 PM
Quote from: Thomas. on July 06, 2012, 08:40:33 PM
And it seems, that anti-aliasing is not applied on the render target...
Yes. Because that's not possible.

Could you explain it? I reduce depth resolution to quarter, it brought 3fps. And also reduce samples from 16 to 8 and fps is now 55, satisfaction 8)

edit: Accumulation buffer, which is needed for anti-aliasing, is not defined in FBO.