„Számítógépes grafika házi feladat tutorial” változatai közötti eltérés
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 | (x - Screen::width/2) / (Screen::width/2), | ||
(y | (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, | x = max(0, InputLuminance-0.004); | ||
OutputLuminance = (x*(6.2*x+0.5))/(x*(6.2*x+1.7)+0.06); | |||
</syntaxhighlight> <br/> | </syntaxhighlight> <br/> | ||