nob_reframe360 (Compatible with IFFS 2025.1.0 and up)

Download this shader

This Matchbox shader reframes spherical footage in equirectangular format to rectilinear images.

Image-wise only spatial transformations are applied to acquire the planar view, thus brightness is retained.

The resulting image format can be customized to any canvas resolution as well as frame and pixel aspect ratios, downscaling being a particular strength of this shader and its filtering options.
By default, antialiasing is disabled for performance reasons, though it is strongly encouraged to enable it for final output. Filtering is done through either a Box- or a Gauss-Kernel, the former - in combination with a width of 1, corresponding to the default of 0.289 is for retaining perfect sharpness; whereas the latter is better suited towards soft filtering, preventing not only aliasing but also temporal flickering (which might occur for the highest spatial-frequency sources & strong non-integer ratio downsampling) - values around 0.4 should be a decent starting point. In any case, the samples number should be selected high enough to accommodate for a smooth filtering, for Gauss filtering with a larger than 0.5, even as high as 4096.

Optionally, lens-distortion can be added to the output, either through numeric parameters or an external ST map. The latter is implicitly expected to be of equal format to the output, fully compatible with as generated by Flame's node.

For enhanced performance, this shader internally uses a ST map representing the aggregate transformation which itself is bilinearly filtered; the nature of which is well behaved for typical use, resulting in negligible interpolation errors. Supersampling then takes place on the application of this ST map.
Note that this may cause a loss of information for border pixels, which would interpolate from sample locations outside the target-frame.
To eliminate this error, one can specify a higher & wider canvas resolution, accommodating the filtering kernel size; to then crop the output to the desired format using the <Resize & Crop> node.
Make sure to maintain correct pixel- & frame aspect ratios between reframing & crop. Use the selector if necessary (for certain versions of Flame, the frame aspect ratio can snap to close-but-not-exact presets such as 16:9).

Upressing is best done with other means than this shader, since significant enlargements on pixel-level might result in strong pixelation. This is especially true for 360° footage, and unless reframing a source at least 8 times the resolution of the output format (64 times the pixel number) with not too narrow a field of view - smoother external filtering such as linear or EWA+linear might be preferable.
For this, one can output the intermediate ST map.
The ST map generated doesn’t wrap in S-dimension, thus repeating wrapping to normalized values might be required. Additionally, since mapping equirectangular to rectilinear coordinates inevitably results in lines of discontinuity for S; a second map for S - with the discontinuity shifted by 180 degrees - is calculated and stored to the blue channel. The matte output for STs is white where the blue channel holds continuous data for S, and black for the green one.

Adaptive Degradation is supported by this shader, which if active bypasses antialiasing.

This shader is licensed under the terms of the MIT license.

For questions contact:
nobbl211 _at_ gmail.com


Version notes

Spelling fixes


Older versions that shader

10th of September this year, around 13:56

Download

Spelling fixes

10th of September this year, around 13:49

Download

Initial publish


Something wrong with this page or the download?

Contact the site custodians via email, if:

How to get help with this particular shader

Sadly, the custodians likely will not be able to explain to you how a shader works or debug its code, or fix it for you. That is the (volountary) role of the shader author.

If the shader does not work on your system or you have questions about it - read the shader description, and try to find the email address of the shader author. Contact them for any issues – letting them know whether you are on Mac or Linux, what version of IFFS you are running etc. will likely help. Be kind and respectful. If you can't get hold of the author - you can try asking in the Logik forum at logik.tv and ask whether anyone could help you debug a particular shader not working.