„Számítógépes grafika házi feladat tutorial” változatai közötti eltérés

Rohamcsiga (vitalap | szerkesztései)
Rohamcsiga (vitalap | szerkesztései)
630. sor: 630. sor:
   void capturePixel(float x, float y) {
   void capturePixel(float x, float y) {
     Vector pos_on_plane = Vector(
     Vector pos_on_plane = Vector(
       (x + 0.5f - Screen::width/2) / Screen::width,
       (x + 0.5f - Screen::width/2) / (Screen::width/2),
       // Itt nem kell megfordítani az y tengelyt. A bal fölső sarok az origó most.
       // Itt nem kell megfordítani az y tengelyt. A bal fölső sarok az origó most.
       (y + 0.5f - Screen::height/2) / Screen::height,  
       (y + 0.5f - Screen::height/2) / (Screen::height/2),  
       0
       0
     );
     );