tornavis/source/blender/windowmanager
Jeroen Bakker 2bae11d5c0 EEVEE: Arbitrary Output Variables
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the
render pass tab and used in shader materials. Both Object and World based
shaders are supported. The AOV can be previewed in the viewport using the
renderpass selector in the shading popover.

AOV names that conflict with other AOVs are automatically corrected. AOV
conflicts with render passes get a warning icon. The reason behind this is that
changing render engines/passes can change the conflict, but you might not notice
it. Changing this automatically would also make the materials incorrect, so best
to leave this to the user.

**Implementation**

The patch adds a copies the AOV structures of Cycles into Blender. The goal is
that the Cycles will use Blenders AOV defintions. In the Blender kernel
(`layer.c`) the logic of these structures are implemented.

The GLSL shader of any GPUMaterial can hold multiple outputs (the main output
and the AOV outputs) based on the renderPassUBO the right output is selected.
This selection uses an hash that encodes the AOV structure. The full AOV needed
to be encoded when actually drawing the material pass as the AOV type changes
the behavior of the AOV. This isn't known yet when the GLSL is compiled.

**Future Developments**

* The AOV definitions in the render layer panel isn't shared with Cycles.
  Cycles should be migrated to use the same viewlayer aovs. During a previous
  attempt this failed as the AOV validation in cycles and in Blender have
  implementation differences what made it crash when an aov name was invalid.
  This could be fixed by extending the external render engine API.
* Add support to Cycles to render AOVs in the 3d viewport.
* Use a drop down list for selecting AOVs in the AOV Output node.
* Give user feedback when multiple AOV output nodes with the same AOV name
  exists in the same shader.
* Fix viewing single channel images in the image editor [T83314]
* Reduce viewport render time by only render needed draw passes. [T83316]

Reviewed By: Brecht van Lommel, Clément Foucault

Differential Revision: https://developer.blender.org/D7010
2020-12-04 08:14:07 +01:00
..
gizmo Cleanup: use over-line for doxy comments 2020-10-27 21:45:55 +11:00
intern EEVEE: Arbitrary Output Variables 2020-12-04 08:14:07 +01:00
message_bus Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix 2020-09-04 21:04:16 +02:00
xr Cleanup: remove unused perspective argument to off-screen drawing 2020-11-20 12:14:50 +11:00
CMakeLists.txt Cleanup: Render Module: move header files to main directory 2020-11-06 10:10:41 -05:00
WM_api.h EEVEE: Arbitrary Output Variables 2020-12-04 08:14:07 +01:00
WM_keymap.h
WM_message.h
WM_toolsystem.h Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix 2020-09-04 21:04:16 +02:00
WM_types.h macOS: follow system preference for natural trackpad scroll direction 2020-11-09 13:51:08 +01:00
wm.h
wm_cursors.h
wm_draw.h
wm_event_system.h
wm_event_types.h UI: Allow changing the active side of line gestures 2020-10-21 18:17:36 +02:00
wm_files.h
wm_surface.h
wm_window.h