![]() Transforming coordinates to NDC is usually accomplished in a step-by-step fashion where we transform an object's vertices to several coordinate systems before finally transforming them to NDC. These NDC are then given to the rasterizer to transform them to 2D coordinates/pixels on your screen. ![]() What we usually do, is specify the coordinates in a range (or space) we determine ourselves and in the vertex shader transform these coordinates to normalized device coordinates (NDC). That is, the x, y and z coordinates of each vertex should be between -1.0 and 1.0 coordinates outside this range will not be visible. OpenGL expects all the vertices, that we want to become visible, to be in normalized device coordinates after each vertex shader run. In the last chapter we learned how we can use matrices to our advantage by transforming all vertices with transformation matrices. Coordinate Systems Getting-started/Coordinate-Systems
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |