|
Blender V5.0
|
#include <eevee_gbuffer.hh>
Public Member Functions | |
| void | acquire (int2 extent, int header_count, int data_count, int normal_count) |
| void | bind (Framebuffer &gbuffer_fb) |
| void | release () |
| template<typename PassType> | |
| void | bind_resources (PassType &pass) |
| template<typename PassType> | |
| void | bind_optional_layers (PassType &pass) |
Public Attributes | |
| Texture | header_tx = {"GBufferHeader"} |
| Texture | closure_tx = {"GBufferClosure"} |
| Texture | normal_tx = {"GBufferNormal"} |
| const uint | header_fb_layer_count = GBUF_HEADER_FB_LAYER_COUNT |
| const uint | closure_fb_layer_count = GBUF_CLOSURE_FB_LAYER_COUNT |
| const uint | normal_fb_layer_count = GBUF_NORMAL_FB_LAYER_COUNT |
Full-screen textures containing geometric and surface data. Used by deferred shading passes. Only one g-buffer is allocated per view and is reused for each deferred layer. This is why there can only be temporary texture inside it.
Everything is stored inside two array texture, one for each format. This is to fit the limitation of the number of images we can bind on a single shader.
The content of the g-buffer is polymorphic. A 8bit header specify the layout of the data. The first layer is always written to while others are written only if needed using imageStore operations reducing the bandwidth needed. Except for some special configurations, the g-buffer holds up to 3 closures.
For each output closure, we also output the color to apply after the lighting computation. The color is stored with a 2 exponent that allows input color with component higher than 1. Color degradation is expected to happen in this case.
Here are special configurations:
Here are Closure configurations:
Sub-Surface Scattering:
contains persistent data.
Definition at line 130 of file eevee_gbuffer.hh.
|
inline |
Definition at line 159 of file eevee_gbuffer.hh.
References closure_fb_layer_count, closure_tx, GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, header_fb_layer_count, header_tx, max_ii(), normal_fb_layer_count, and normal_tx.
Referenced by blender::eevee::ShadingView::render(), and blender::eevee::PlanarProbeModule::set_view().
|
inline |
Definition at line 194 of file eevee_gbuffer.hh.
References GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DEVICE_INTEL_UHD, GPU_DRIVER_ANY, GPU_framebuffer_bind(), GPU_framebuffer_bind_ex, GPU_framebuffer_clear_stencil(), GPU_LOADACTION_CLEAR, GPU_LOADACTION_DONT_CARE, GPU_LOADACTION_LOAD, GPU_OS_MAC, GPU_stencil_export_support(), GPU_STOREACTION_STORE, GPU_type_matches(), and header_tx.
|
inline |
Definition at line 242 of file eevee_gbuffer.hh.
References GBUF_CLOSURE_SLOT, GBUF_HEADER_SLOT, and GBUF_NORMAL_SLOT.
Referenced by blender::eevee::DeferredLayerBase::gbuffer_pass_sync().
Definition at line 235 of file eevee_gbuffer.hh.
References closure_tx, header_tx, and normal_tx.
|
inline |
Definition at line 223 of file eevee_gbuffer.hh.
Referenced by blender::eevee::PlanarProbeModule::set_view().
| const uint blender::eevee::GBuffer::closure_fb_layer_count = GBUF_CLOSURE_FB_LAYER_COUNT |
Definition at line 139 of file eevee_gbuffer.hh.
Referenced by acquire().
| Texture blender::eevee::GBuffer::closure_tx = {"GBufferClosure"} |
Definition at line 134 of file eevee_gbuffer.hh.
Referenced by acquire(), bind_resources(), blender::eevee::ShadingView::render(), and blender::eevee::PlanarProbeModule::set_view().
| const uint blender::eevee::GBuffer::header_fb_layer_count = GBUF_HEADER_FB_LAYER_COUNT |
Definition at line 138 of file eevee_gbuffer.hh.
Referenced by acquire().
| Texture blender::eevee::GBuffer::header_tx = {"GBufferHeader"} |
Definition at line 133 of file eevee_gbuffer.hh.
Referenced by acquire(), bind(), bind_resources(), blender::eevee::ShadingView::render(), and blender::eevee::PlanarProbeModule::set_view().
| const uint blender::eevee::GBuffer::normal_fb_layer_count = GBUF_NORMAL_FB_LAYER_COUNT |
Definition at line 140 of file eevee_gbuffer.hh.
Referenced by acquire().
| Texture blender::eevee::GBuffer::normal_tx = {"GBufferNormal"} |
Definition at line 135 of file eevee_gbuffer.hh.
Referenced by acquire(), bind_resources(), blender::eevee::ShadingView::render(), and blender::eevee::PlanarProbeModule::set_view().