This implements the base needed for supporting multiple view concurently inside the same drawcall. The view used by common macros and view related functions is indexed using a global variable `drw_view_id` which can be set arbitrarly or read from the `drw_ResourceID`. This is needed for EEVEE-Next shadow but can be used for other purpose in the future. Note that a shader specialization is needed for it to work. `DRW_VIEW_LEN` needs to be defined to the amount of view the shader will access. The number of views contained in a `draw::View` is set at construction time. Note that the maximum number of object correctly drawn by the shaders using multiple views will be lower than thoses who don't.
10 KiB
10 KiB