Multiple depth targets

Im wanting to write the depth into 2 targets at once
#A normal + #B quarter sized

now this is not possible at present is it?

also i cant Blit from the fullsize to quarter size since blit doesnt except different sized targets with depth.

so what can I do? (aside from physically rendering the geometry twice that is)

cheers zed

Render to an FBO with a depth-texture attached. Do whatever you want with the depth-texture afterwards: resizing, filtering, using as a parameter for a post-process filter like SSAO. And you can use gl_FragDepth to do tricks.

cheers Ilian but wont you end up with errors due to the averaging of the non linear depth values? or is this visually not that jarring?

perhaps u can convert the z value to real value (do the resize) and then recreate the z value again

Yes, it’ll create artifacts, but in recent games developers often decide to render particles in half-resolution, as an optimization - that doesn’t create too noticeable problems.
Though, I do not know whether they reconstruct the Z value when resizing.

I am not belive that using gl_FragDepth is a good idea.
What’s wrong with using one MRT as eyePosition ?

i think u mean quarter resolution ie 1/2 x 1/2
yes this is part of the reason i wanted it for, the artifacts were’t really noticable (though didnt look to closely)
the particles though did look quite a lot worse,
and as its not 4x quicker since u have to first lay down depth + also render the final particle texture blended upscaled over the whole framebuffer ive decided not to do it. (in fact often it will make the whole rendering slower, unless u just enabled it for frames where theres lotsa particles onscreen)
a better method is just to fade out the particles when they become to large on the screen

There is a GPU gems 3 article about something like this. It talks about how to treat the artifacts.

Chapter 23: High-Speed, Off-Screen Particles, IIRC.

have you got asperger’s syndrome, dark photon? being able to call to mind a chapter number is very…special.

Man, I wish. Sadly I’m just a googlemaniac that remembered a fragment of the title.

must be just me then - except I can only remember beer mats manufactured between march 1953 and november 1958. Now you tell me what use is that?