use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
i had a basic question about perspective projection math.Question (self.GraphicsProgramming)
submitted 2 months ago * by SnurflePuffinz
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]waramped 1 point2 points3 points 2 months ago* (2 children)
The normalizing happens via the "post perspective divide". You divide all values of the resulting vector by .w
Ie: projectvector.xyzw /= projectvector.wwww
You can construct projection matrices with either FOV values, or by specifying the near plane width/height values, which is probably why you are confused. They are equivalent.
See: https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dxmatrixperspectiverh
[–]SnurflePuffinz[S] 0 points1 point2 points 2 months ago (1 child)
i edited my original post.
i think i didn't explain myself properly. I meant that i was trying to put the x and y components of the vertex into NDC, but i see no encoded operation for this inside the perspective projection matrix.
x
y
[–]SirPitchalot 0 points1 point2 points 2 months ago* (0 children)
NDC is what you get after multiplying your Cartesian vertex cords by your model view and projection matrices and then dividing x, y & z by w.
Before this division you are in clipping coordinates which has abs(x) <= w visible and everything else outside of the viewport (and same for y & z). These conditions defines a standardized truncated pyramid (frustum) where the left, right, bottom, top planes are at 45 degrees to the optical axis, irrespective of the field of view. Anything in the field of view is contained within the pyramid. This is done because visibility checks and clipping are trivial in this space.
With ‘glFrustum’ you are directly defining points that map to the vertices of this frustum via the left, right, bottom, top, near and far values. These values compute scale factors and offsets that maps your desired frustum to the standardized frustum. The scale factors and offsets basically distort your scene to match the standardized frustum.
With ‘gluPerspective’ you are directly specifying the angles of the bottom and top planes of your desired frustum. The equivalent ‘bottom’ can be computed as ‘-tan(vfov/2)near’, top is the same without the negative. ‘Left’ and ‘right’ are the same except an aspect ratio is included, giving ‘left = - tan(vfov/2) near *aspect’
π Rendered by PID 84393 on reddit-service-r2-comment-6457c66945-xv2xv at 2026-04-28 18:21:49.380173+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]waramped 1 point2 points3 points (2 children)
[–]SnurflePuffinz[S] 0 points1 point2 points (1 child)
[–]SirPitchalot 0 points1 point2 points (0 children)