solidallas.blogg.se

Wow simple coords not working
Wow simple coords not working









wow simple coords not working

Local coordinates are the coordinates of your object relative to its local origin they're the coordinates your object begins in.The following image displays the process and shows what each transformation does:

wow simple coords not working

Our vertex coordinates first start in local space as local coordinates and are then further processed to world coordinates, view coordinates, clip coordinates and eventually end up as screen coordinates. To transform the coordinates from one space to the next coordinate space we'll use several transformation matrices of which the most important are the model, view and projection matrix. You're probably quite confused by now by what a space or coordinate system actually is so we'll explain them in a more high-level fashion first by showing the total picture and what each specific space represents. Those are all a different state at which our vertices will be transformed in before finally ending up as fragments. There are a total of 5 different coordinate systems that are of importance to us: The advantage of transforming them to several intermediate coordinate systems is that some operations/calculations are easier in certain coordinate systems as will soon become apparent. 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











Wow simple coords not working