its almost assuredly dependant on the hardware. thats why zbuffer
formats are typically treated as opaque.

one tactic to use is to write some known values to the zbuffer by
rendering objects at certain known locations ( z=0, z=1, z=near-plane,
z=10, z=100, z=far-plane, etc ) and reading those values back. do this
at startup or some other opportune time early on. that will allow you to
determine what kind of mapping the hardware is using.

note some cards dont have a true z-buffer...eg scene capture cards ala
PowerVR. Kyro and KyroII are decent cards, and PVRI and PVRII are out in
the marketplace in some numbers so you will run into this case. off the
top of my head, I am not sure what they return for z-buffer reads.

Its also possible some hardware would fail zbuffer locks now or in the
future. for example D3D explicitly disallows front-buffer locks with DX
8, so features that used to exist dont always continue to exist...and
thus cant be counted on.

Sun engineers would have to comment on what Java3D would do for
DepthComponentFloat if there is no z-buffer or the z-buffer is
unreadable...

> -----Original Message-----
> From: Anthony Ashbrook [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 5:13 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Interpretation of depth buffer values
>
>
> I have an application in which I need to interpret values
> in the depth buffer as distances relative to the camera or
> the image plane.
>
> I have been able to obtain the depth data using the
> DepthComponentFloat object but I am unsure of the
> mapping from these float values to distances. I am
> also concerned that this mapping might be dependant
> on the graphics hardware being used.
>
> Does anyone have any suggestions or comments on
> this subject.
>
> Regards.
>
> Anthony.
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help,
> send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to