Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SZP08_modelovani_a_projekce.ad #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xdanca01
Copy link

Nejdříve se musí provést depth mapping a až teprve můžeme provést perspective division. Je to napsáno i v citaci: http://learnwebgl.brown37.net/08_projections/projections_perspective.html

Translate the apex of the frustum to the origin. (Yellow matrix)
Scale the depth values (z) into a normalized range (-1,+1) (and setup for division by (-z)). (Purple matrix)
Perform the perspective calculation. (Gray matrix)
Scale the 2D (x’,y’) values in the viewing window to a 2-by-2 unit square; (-1,-1) to (+1,+1). (Cyan matrix)

Nejdříve se musí provést depth mapping a až teprve můžeme provést perspective division. Je to napsáno i v citaci: http://learnwebgl.brown37.net/08_projections/projections_perspective.html


    Translate the apex of the frustum to the origin. (Yellow matrix)
    Scale the depth values (z) into a normalized range (-1,+1) (and setup for division by (-z)). (Purple matrix)
    Perform the perspective calculation. (Gray matrix)
    Scale the 2D (x’,y’) values in the viewing window to a 2-by-2 unit square; (-1,-1) to (+1,+1). (Cyan matrix)
@cafour
Copy link
Owner

cafour commented Jun 15, 2024

No jo, jenže ten samý článek má o kus výše:

1. Translate the apex of the frustum to the origin.
2. Perform the perspective calculation.
3. Scale the 2D (x’,y’) values in the viewing window to a 2-by-2 unit square: (-1,-1) to (+1,+1).
4. Scale the depth values (z) into a normalized range (-1,+1).
5. Flip the orientation of the z axis to match the clipping volume’s orientation.

Je možné, že výsledek vyjde stejně, ať je ta matice na kterémkoli z těch dvou míst. Checknu to za pár dní, až mě nebude pálit deadline, a pokud máš pravdu, a M_{depth} fakt musí být už druhá, tak tohle PR mergnu.

Každopádně díky za PRko! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants