[Feature] Add fisheye rasterized rendering#44
Conversation
The image link in the PR description seems broken or somehow I don't have access. Could you fix it? |
|
Ah it was a copied link, reuploaded it in this PR. In case you still can't see it it's the pic in the bottom right of page 43 of those Stanford slides: "Problem: oversampling at periphery" |
| }; | ||
|
|
||
| Projection projection; | ||
| float fisheyeFovRadians; |
There was a problem hiding this comment.
What does fisheyeFovRadians mean? How does it work different from fovScale?
It's better to write a documentation or README to explain how the fisheye camera is implemented and how each parameters that are added affect the final rendering result. The slides from the link in the PR description is not very detailed.
| float zNear; | ||
| float zFar; | ||
| int32_t worldIDX; | ||
| float fisheyeThetaMax; |
| some_value += (int)aabbs[0].data[0].x; | ||
|
|
||
| continue; | ||
| if (sm.camera.projectionType == MADRONA_PROJECTION_PERSPECTIVE) { |
There was a problem hiding this comment.
It looks like culling will be skipped when doing fisheye rendering. Could you explain why? Do you have benchmark data to show the performance impact on rendering without culling?
| float2 sample_px = float2(idx.xy); | ||
| bool sample_valid = true; | ||
|
|
||
| if (view_data.projectionType == MADRONA_PROJECTION_FISHEYE_EQUIDISTANT) { |
There was a problem hiding this comment.
Could you move fisheye-specific lighting code to a separate function?
The changes being made adds additional computation that was not necessary for perspective camera rendering.
There was a problem hiding this comment.
Please also explain the core algorithm/approach here in documentation.
|
@NoahLinckeScout do you have some time to check the @yuhongyi 's review? |
Add two pass fisheye rendering
This avoids large polygon interpolation errors that will occur if we attempt to render directly in fisheye.
Next steps could be to add more viewports or supersampling, by default we oversample the edges and undersample the center of images (lower resolution in the center)

ex: https://gfxcourses.stanford.edu/cs248/winter21content/media/vr/12_vr_sm.pdf