Blender V5.3
eevee_renderbuffers.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12
13#pragma once
14
15#include "DRW_render.hh"
16
18
19namespace blender::eevee {
20
21class Instance;
22
24 public:
26
27 static constexpr gpu::TextureFormat color_format = gpu::TextureFormat::SFLOAT_16_16_16_16;
28 static constexpr gpu::TextureFormat float_format = gpu::TextureFormat::SFLOAT_16;
29 static constexpr gpu::TextureFormat depth_format = gpu::TextureFormat::SFLOAT_32_DEPTH_UINT_8;
30 static constexpr gpu::TextureFormat object_id_format = gpu::TextureFormat::UINT_16;
31 static constexpr gpu::TextureFormat prepass_normal_format = gpu::TextureFormat::UNORM_10_10_10_2;
32
35
36 // TextureFromPool mist_tx; /* Derived from depth_tx during accumulation. */
44
45 private:
46 Instance &inst_;
47
48 int2 extent_;
49
50 public:
52
72
73 void init();
74
75 /* Acquires (also ensures) the render buffer before rendering to them. */
76 void acquire(int2 extent, gpu::TextureFormat raycast_depth_format = depth_format);
77 void release();
78
79 /* Return the size of the allocated render buffers. Undefined if called before `acquire()`. */
81 {
82 return extent_;
83 }
84
86};
87
88} // namespace blender::eevee
A running instance of the engine.
static ePassStorageType pass_storage_type(eViewLayerEEVEEPassType pass_type)
static constexpr gpu::TextureFormat prepass_normal_format
static constexpr gpu::TextureFormat depth_format
static constexpr gpu::TextureFormat float_format
static constexpr gpu::TextureFormat color_format
RenderBuffers(Instance &inst, RenderBuffersInfoData &data)
void acquire(int2 extent, gpu::TextureFormat raycast_depth_format=depth_format)
static constexpr gpu::TextureFormat object_id_format
VecBase< int32_t, 2 > int2
@ EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET
@ EEVEE_RENDER_PASS_MIST
@ EEVEE_RENDER_PASS_CRYPTOMATTE_MATERIAL
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_DENOISING_ROUGHNESS
@ EEVEE_RENDER_PASS_DEPTH
@ EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT
@ EEVEE_RENDER_PASS_SHADOW
@ EEVEE_RENDER_PASS_DENOISING_DEPTH