SCM Repository
[diderot] Diff of /examples/vr-demo/vr.diderot
Diff of /examples/vr-demo/vr.diderot
Parent Directory
|
Revision Log
|
Patch
55 |
strand RayCast (int ui, int vi) |
strand RayCast (int ui, int vi) |
56 |
{ |
{ |
57 |
real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5); |
real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5); |
58 |
real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5); |
// we flip the v coordinate, since we are using DrawPixels to render the image |
59 |
|
real rayV = lerp(-camVmax, camVmax, -0.5, real(imgResV - vi - 1), real(imgResV)-0.5); |
60 |
vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist; |
vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist; |
61 |
vec3 toEye = normalize(-rayVec); |
vec3 toEye = normalize(-rayVec); |
62 |
|
|
|
Legend:
Removed from v.2069 |
|
changed lines |
|
Added in v.2070 |
|
|