Welcome to mirror list, hosted at ThFree Co, Russian Federation.

eevee_renderbuffers.hh « eevee_next « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 787f5604aa4397d6a9d73f4c78691abd2a45c9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2022 Blender Foundation.
 */

/** \file
 * \ingroup eevee
 *
 * Render buffers are textures that are filled during a view rendering.
 * Their content is then added to the accumulation buffers of the film class.
 * They are short lived and can be reused when doing multi view rendering.
 */

#pragma once

#include "DRW_render.h"

#include "eevee_shader_shared.hh"

namespace blender::eevee {

class Instance;

class RenderBuffers {
 public:
  TextureFromPool depth_tx;
  TextureFromPool combined_tx;

  // TextureFromPool mist_tx; /* Derived from depth_tx during accumulation. */
  TextureFromPool normal_tx;
  TextureFromPool vector_tx;
  TextureFromPool diffuse_light_tx;
  TextureFromPool diffuse_color_tx;
  TextureFromPool specular_light_tx;
  TextureFromPool specular_color_tx;
  TextureFromPool volume_light_tx;
  TextureFromPool emission_tx;
  TextureFromPool environment_tx;
  TextureFromPool shadow_tx;
  TextureFromPool ambient_occlusion_tx;
  // TextureFromPool cryptomatte_tx; /* TODO */
  /* TODO(fclem): Use texture from pool once they support texture array. */
  Texture aov_color_tx;
  Texture aov_value_tx;

 private:
  Instance &inst_;

 public:
  RenderBuffers(Instance &inst) : inst_(inst){};

  /* Acquires (also ensures) the render buffer before rendering to them. */
  void acquire(int2 extent);
  void release();
};

}  // namespace blender::eevee