mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.8k stars 429 forks source link

Incorrect projection light range #337

Closed Sousuke13 closed 1 year ago

Sousuke13 commented 1 year ago

Since the screen distance is calculated as 1/tan(fov/2) in the perspective transformation, when aspect>1, the screen range is not (-aspect,-1)-(aspect,1) but ( -1,-1/aspect)-(1,1/aspect).

mmp commented 1 year ago

That is actually intended: in pbrt the fov specifies the fov angle for whichever is narrower of width and height. (This also matches the perspective camera.) See also the ProjectionLight documentation here: https://www.pbrt.org/fileformat-v4#lights

Sousuke13 commented 1 year ago

sorry. I thought the fov was on the wide side.

2023年4月22日(土) 23:37 Matt Pharr @.***>:

That is actually intended: in pbrt the fov specifies the fov angle for whichever is narrower of width and height. (This also matches the perspective camera.) See also the ProjectionLight documentation here: https://www.pbrt.org/fileformat-v4#lights

— Reply to this email directly, view it on GitHub https://github.com/mmp/pbrt-v4/issues/337#issuecomment-1518674757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWNLUH7VC433GLULPBFTV3XCPUMLANCNFSM6AAAAAAXHWVV4U . You are receiving this because you authored the thread.Message ID: @.***>