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

Csala Tamás (vitalap | szerkesztései)
Csala Tamás (vitalap | szerkesztései)
a apró javítások Sugárkövetés
596. sor: 596. sor:
<br/> <syntaxhighlight lang="c">  
<br/> <syntaxhighlight lang="c">  
Vector pos_on_plane = Vector(
Vector pos_on_plane = Vector(
   (x + 0.5f - Screen::width/2) / (Screen::width/2),
   (x - Screen::width/2) / (Screen::width/2),
   (y + 0.5f - Screen::height/2) / (Screen::height/2),  
   (y - Screen::height/2) / (Screen::height/2),  
   0
   0
);
);
651. sor: 651. sor:
   void capturePixel(float x, float y) {
   void capturePixel(float x, float y) {
     Vector pos_on_plane = Vector(
     Vector pos_on_plane = Vector(
       (x - Screen::width/2) / (Screen::width/2),
       (x + 0.5f - Screen::width/2) / (Screen::width/2),
       (y - Screen::height/2) / (Screen::height/2),  
       (y + 0.5f - Screen::height/2) / (Screen::height/2),  
       0
       0
     );
     );
1 095. sor: 1 095. sor:


<br/> <syntaxhighlight lang="c">
<br/> <syntaxhighlight lang="c">
   x = max(0, InputColor-0.004);
   x = max(0, InputLuminance-0.004);
   OutputColor = (x*(6.2*x+0.5))/(x*(6.2*x+1.7)+0.06);
   OutputLuminance = (x*(6.2*x+0.5))/(x*(6.2*x+1.7)+0.06);
</syntaxhighlight> <br/>
</syntaxhighlight> <br/>