Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Graphics pipeline
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Window-Viewport transformation ==== [[File:Screen Mapping.svg|thumb|Window-Viewport-Transformation]] To output the image to any target area (viewport) of the screen, another transformation, the ''Window-Viewport transformation'', must be applied. This is a shift, followed by scaling. The resulting coordinates are the device coordinates of the output device. The viewport contains 6 values: the height and width of the window in pixels, the upper left corner of the window in window coordinates (usually 0, 0), and the minimum and maximum values for Z (usually 0 and 1). : Formally: <math>\begin{pmatrix} x\\ y\\ z \end{pmatrix}=\begin{pmatrix} {vp}.X+(1.0+v.X)*{vp}.{width}/2.0\\ {vp}.Y+(1.0-v.Y)*{vp}.{height}/2.0\\ {vp}.{minz}+v.Z*({vp}.{maxz} - {vp}.{minz}) \end{pmatrix}</math> : With vp=Viewport; v=Point after projection On modern hardware, most of the geometry computation steps are performed in the [[vertex shader]]. This is, in principle, freely programmable, but generally performs at least the transformation of the points and the illumination calculation. For the DirectX programming interface, the use of a custom vertex shader is necessary from version 10, while older versions still have a standard shader.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)