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

eevee_culling_info.hh « infos « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ec6a76dec66e319ca00f2e9de06ddb3daec79b0b (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
57
58
59
60
61
62
63
64
65

/* FIXME(@fclem): This file is included inside the gpu module. We have to workaround to include
 * eevee header. */
#include "../../draw/engines/eevee/eevee_defines.hh"

#include "gpu_shader_create_info.hh"

/* -------------------------------------------------------------------- */
/** \name Culling
 * \{ */

GPU_SHADER_CREATE_INFO(eevee_culling_select)
    .do_static_compilation(true)
    .additional_info("eevee_shared")
    .local_group_size(CULLING_BATCH_SIZE)
    .storage_buf(0, Qualifier::READ, "LightData", "lights_buf[]")
    .storage_buf(1, Qualifier::READ_WRITE, "CullingData", "lights_cull_buf")
    .storage_buf(2, Qualifier::READ_WRITE, "uint", "keys_buf[]")
    .compute_source("eevee_culling_select_comp.glsl");

GPU_SHADER_CREATE_INFO(eevee_culling_sort)
    .do_static_compilation(true)
    .additional_info("eevee_shared")
    .local_group_size(CULLING_BATCH_SIZE)
    .storage_buf(0, Qualifier::READ, "LightData", "lights_buf[]")
    .storage_buf(1, Qualifier::READ_WRITE, "CullingData", "lights_cull_buf")
    .storage_buf(2, Qualifier::READ, "uint", "keys_buf[]")
    .storage_buf(3, Qualifier::WRITE, "CullingZBin", "lights_zbin_buf[]")
    .storage_buf(4, Qualifier::WRITE, "LightData", "out_lights_buf[]")
    .sampler(0, ImageType::DEPTH_2D, "depth_tx")
    .fragment_out(0, Type::VEC4, "out_velocity_camera")
    .fragment_out(1, Type::VEC4, "out_velocity_view")
    .compute_source("eevee_culling_sort_comp.glsl");

GPU_SHADER_CREATE_INFO(eevee_culling_tile)
    .do_static_compilation(true)
    .additional_info("eevee_shared")
    .local_group_size(1024)
    .storage_buf(0, Qualifier::READ, "LightData", "lights_buf[]")
    .storage_buf(1, Qualifier::READ, "CullingData", "lights_cull_buf")
    .storage_buf(2, Qualifier::WRITE, "CullingWord", "lights_tile_buf[]")
    .compute_source("eevee_culling_tile_comp.glsl");

GPU_SHADER_CREATE_INFO(eevee_light_data)
    .additional_info("eevee_shared")
    .storage_buf(0, Qualifier::READ, "LightData", "lights_buf[]")
    .storage_buf(1, Qualifier::READ, "CullingZBin", "lights_zbin_buf[]")
    .storage_buf(2, Qualifier::READ, "CullingData", "lights_cull_buf")
    .storage_buf(3, Qualifier::READ, "CullingWord", "lights_tile_buf[]");

/** \} */

/* -------------------------------------------------------------------- */
/** \name Debug
 * \{ */

GPU_SHADER_CREATE_INFO(eevee_culling_debug)
    .do_static_compilation(true)
    .sampler(0, ImageType::DEPTH_2D, "depth_tx")
    .fragment_out(0, Type::VEC4, "out_debug_color")
    .additional_info("eevee_shared")
    .fragment_source("eevee_culling_debug_frag.glsl")
    .additional_info("draw_fullscreen", "eevee_light_data");

/** \} */