Bug 1458 - GraphUI Z-Epsilon Support: Expose Z-Epsilon API in Scene and utilization in Button
Summary: GraphUI Z-Epsilon Support: Expose Z-Epsilon API in Scene and utilization in B...
Status: RESOLVED FIXED
Alias: None
Product: GraphUI
Classification: JogAmp
Component: Core (show other bugs)
Version: 2.6.0
Hardware: All all
: P4 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1454
  Show dependency treegraph
 
Reported: 2023-09-24 01:49 CEST by Sven Gothel
Modified: 2023-09-24 01:51 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
bc4a97a3751b32a7825a41481959f04ff3efb3d2 d5b17eddf7e7f1c33b269a3a2ed8eca959c6d639
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2023-09-24 01:49:29 CEST
Z-Epsilon is approximately the smallest Z value recognized by the graphics stack
to make a difference in Z positioning.

Z-Epsilon depends on the current projection matrix,
i.e. Z distance of the viewer.
See http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

z_epsilon = z * z / ( zNear * ( 1 << zBits ) - z );

We utilize Z-Epsilon as the smallest offset between the button background shape
and the label text.

We also utilize Z-Epsilon as the offset to elevate the active (selected) shape (add z-offset) and select (pick) in Z descending order (Bug 1454).
Comment 1 Sven Gothel 2023-09-24 01:50:43 CEST
bc4a97a3751b32a7825a41481959f04ff3efb3d2
GraphUI Scene: Expose Z-Epsilon API for default and current PMVMatrixSetup values; Button add Z-Epsilon API for ctor and setLabelZOffset(..)

+++

d5b17eddf7e7f1c33b269a3a2ed8eca959c6d639
GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor 

+++

..