Blender V5.3
workbench_shadow.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
17
18#include "BKE_object.hh"
19#include "DNA_scene_types.h"
20#include "DRW_render.hh"
21#include "GPU_compute.hh"
22
23#include "draw_cache.hh"
24
25#include "workbench_private.hh"
26
27namespace blender::workbench {
28
29void ShadowPass::ShadowView::setup(View &view, float3 light_direction, bool force_fail_method)
30{
31 force_fail_method_ = force_fail_method;
32 light_direction_ = light_direction;
33 sync(view.viewmat(), view.winmat());
34
35 /* Prepare frustum extruded in the negative light direction,
36 * so we can test regular bounding boxes against it for culling. */
37
38 /* Frustum Corners indices
39 * Z Y
40 * | /
41 * |/
42 * .-----X
43 * 3----------7
44 * /| /|
45 * / | / |
46 * 0----------4 |
47 * | | | |
48 * | 2-------|--6
49 * | / | /
50 * |/ |/
51 * 1----------5
52 */
53
54 /* Frustum Planes indices */
55 const int x_neg = 0; /* Left */
56 const int x_pos = 5; /* Right */
57 const int y_neg = 1; /* Bottom */
58 const int y_pos = 3; /* Top */
59 const int z_pos = 4; /* Near */
60 const int z_neg = 2; /* Far */
61
62 const int3 corner_faces[8] = {
63 {x_neg, y_neg, z_pos},
64 {x_neg, y_neg, z_neg},
65 {x_neg, y_pos, z_neg},
66 {x_neg, y_pos, z_pos},
67 {x_pos, y_neg, z_pos},
68 {x_pos, y_neg, z_neg},
69 {x_pos, y_pos, z_neg},
70 {x_pos, y_pos, z_pos},
71 };
72
73 const int2 edge_faces[12] = {
74 {x_neg, y_neg},
75 {x_neg, z_neg},
76 {x_neg, y_pos},
77 {x_neg, z_pos},
78 {y_neg, x_pos},
79 {z_neg, x_pos},
80 {y_pos, x_pos},
81 {z_pos, x_pos},
82 {y_neg, z_pos},
83 {z_neg, y_neg},
84 {y_pos, z_neg},
85 {z_pos, y_pos},
86 };
87
88 const int2 edge_corners[12] = {
89 {0, 1},
90 {1, 2},
91 {2, 3},
92 {3, 0},
93 {4, 5},
94 {5, 6},
95 {6, 7},
96 {7, 4},
97 {0, 4},
98 {1, 5},
99 {2, 6},
100 {3, 7},
101 };
102
103 std::array<float3, 8> frustum_corners = this->frustum_corners_get();
104 std::array<float4, 6> frustum_planes = this->frustum_planes_get();
105
106 float3 frustum_center = float3(0.0f);
107 for (float3 corner : frustum_corners) {
108 frustum_center += corner / float(frustum_corners.size());
109 }
110
111 Vector<float4> faces_result;
112 Vector<float3> corners_result;
113
114 /* "Unlit" frustum faces are left "as-is" */
115
116 bool face_lit[6];
117 for (int i : IndexRange(6)) {
118 /* Make the frustum normals face outwards */
119 frustum_planes[i] *= float4(-1, -1, -1, 1);
120
121 face_lit[i] = math::dot(float3(frustum_planes[i]), light_direction_) < 0;
122 if (!face_lit[i]) {
123 faces_result.append(frustum_planes[i]);
124 }
125 }
126
127 /* Edges between lit and unlit faces are extruded "infinitely" towards the light source */
128
129 for (int i : IndexRange(12)) {
130 int2 f = edge_faces[i];
131 bool a_lit = face_lit[f[0]];
132 bool b_lit = face_lit[f[1]];
133 if (a_lit != b_lit) {
134 /* Extrude Face */
135 float3 corner_a = frustum_corners[edge_corners[i][0]];
136 float3 corner_b = frustum_corners[edge_corners[i][1]];
137 float3 edge_direction = math::normalize(corner_b - corner_a);
138 float3 normal = math::normalize(math::cross(light_direction_, edge_direction));
139 /* Ensure the plane faces outwards */
140 if (dot(corner_a - frustum_center, normal) < 0.0f) {
141 normal *= -1.0f;
142 }
143
144 float4 extruded_face = float4(normal, math::dot(normal, corner_a));
145 faces_result.append(extruded_face);
146 }
147 }
148
149 for (int i_corner : IndexRange(8)) {
150 int lit_faces = 0;
151 for (int i_face : IndexRange(3)) {
152 lit_faces += face_lit[corner_faces[i_corner][i_face]] ? 1 : 0;
153 }
154 if (lit_faces < 3) {
155 /* Add original corner */
156 corners_result.append(frustum_corners[i_corner]);
157
158 if (lit_faces > 0) {
159 /* Add extruded corner */
160 corners_result.append(float3(frustum_corners[i_corner]) - (light_direction_ * 1e4f));
161 }
162 }
163 }
164
165 for (int i : corners_result.index_range()) {
166 extruded_frustum_.corners[i] = float4(corners_result[i], 1);
167 }
168 extruded_frustum_.corners_count = corners_result.size();
169
170 for (int i : faces_result.index_range()) {
171 extruded_frustum_.planes[i] = faces_result[i];
172 }
173 extruded_frustum_.planes_count = faces_result.size();
174
175 extruded_frustum_.push_update();
176}
177
178bool ShadowPass::ShadowView::debug_object_culling(Object *ob)
179{
180 printf("Test %s\n", ob->id.name);
181 const Bounds<float3> bounds = *BKE_object_boundbox_get(ob);
182 const std::array<float3, 8> corners = bounds::corners(bounds);
183 for (int p : IndexRange(extruded_frustum_.planes_count)) {
184 float4 plane = extruded_frustum_.planes[p];
185 bool separating_axis = true;
186 for (float3 corner : corners) {
187 corner = math::transform_point(ob->object_to_world(), corner);
188 float signed_distance = math::dot(corner, float3(plane)) - plane.w;
189 if (signed_distance <= 0) {
190 separating_axis = false;
191 break;
192 }
193 }
194 if (separating_axis) {
195 printf("Separating Axis >>> x: %f, y: %f, z: %f, w: %f \n", UNPACK4(plane));
196 return true;
197 }
198 }
199 return false;
200}
201
202void ShadowPass::ShadowView::set_mode(ShadowPass::PassType type)
203{
204 current_pass_type_ = type;
205 /* Ensure compute_visibility runs again after updating the mode. */
206 manager_fingerprint_ = 0;
207}
208
209void ShadowPass::ShadowView::compute_visibility(ObjectBoundsBuf &bounds,
210 ObjectInfosBuf & /*infos*/,
211 uint resource_len,
212 bool /*debug_freeze*/)
213{
214 /* TODO (Miguel Pozo): Add debug_freeze support */
215
216 GPU_debug_group_begin("ShadowView.compute_visibility");
217
218 uint word_per_draw = this->visibility_word_per_draw();
219 /* Switch between tightly packed and set of whole word per instance. */
220 uint words_len = (view_len_ == 1) ? divide_ceil_u(resource_len, 32) :
221 resource_len * word_per_draw;
222 words_len = ceil_to_multiple_u(max_ii(1, words_len), 4);
223 const uint32_t data = 0xFFFFFFFFu;
224
225 if (current_pass_type_ == ShadowPass::PASS) {
226 /* TODO(fclem): Resize to nearest pow2 to reduce fragmentation. */
227 pass_visibility_buf_.resize(words_len);
228 GPU_storagebuf_clear(pass_visibility_buf_, data);
229 fail_visibility_buf_.resize(words_len);
230 GPU_storagebuf_clear(fail_visibility_buf_, data);
231 }
232 else if (current_pass_type_ == ShadowPass::FAIL) {
233 /* Already computed in the ShadowPass::PASS */
235 return;
236 }
237 else {
238 visibility_buf_.resize(words_len);
239 GPU_storagebuf_clear(visibility_buf_, data);
240 }
241
242 if (do_visibility_) {
243 /* TODO(@pragma37): Use regular culling for the caps pass. */
244 gpu::Shader *shader = current_pass_type_ == ShadowPass::FORCED_FAIL ?
247 GPU_shader_bind(shader);
248 GPU_shader_uniform_1i(shader, "resource_len", resource_len);
249 GPU_shader_uniform_1i(shader, "view_len", view_len_);
250 GPU_shader_uniform_1i(shader, "visibility_word_per_draw", word_per_draw);
251 GPU_shader_uniform_1b(shader, "force_fail_method", force_fail_method_);
252 GPU_shader_uniform_3fv(shader, "shadow_direction", light_direction_);
253 GPU_uniformbuf_bind(extruded_frustum_, GPU_shader_get_ubo_binding(shader, "extruded_frustum"));
254 GPU_storagebuf_bind(bounds, GPU_shader_get_ssbo_binding(shader, "bounds_buf"));
255 if (current_pass_type_ == ShadowPass::FORCED_FAIL) {
256 GPU_storagebuf_bind(visibility_buf_, GPU_shader_get_ssbo_binding(shader, "visibility_buf"));
257 }
258 else {
259 GPU_storagebuf_bind(pass_visibility_buf_,
260 GPU_shader_get_ssbo_binding(shader, "pass_visibility_buf"));
261 GPU_storagebuf_bind(fail_visibility_buf_,
262 GPU_shader_get_ssbo_binding(shader, "fail_visibility_buf"));
263 }
267 }
268
270}
271
273{
274 switch (current_pass_type_) {
275 case ShadowPass::PASS:
276 return pass_visibility_buf_;
277 case ShadowPass::FAIL:
278 return fail_visibility_buf_;
279 case ShadowPass::FORCED_FAIL:
280 return visibility_buf_;
281 default:
283 }
284 return visibility_buf_;
285}
286
287PassMain::Sub *&ShadowPass::get_pass_ptr(PassType type, bool manifold, bool cap /*=false*/)
288{
289 return passes_[type][manifold][cap];
290}
291
292void ShadowPass::init(const SceneState &scene_state, SceneResources &resources)
293{
294 enabled_ = scene_state.draw_shadows;
295 use_raytracing_ = scene_state.shadows_use_rt;
296 needs_rt_update_ = use_raytracing_ && (!shadow_as_ || scene_state.updated);
297 if (!use_raytracing_) {
298 shadow_as_ = nullptr;
299 }
300 else if (needs_rt_update_) {
301 shadow_as_ = gpu::TopLevelASPtr(GPU_ray_tracing_tlas_alloc("WorkbenchShadowTLAS"));
302 }
303
304 if (!enabled_) {
305 resources.world_buf.shadow_mul = 0.0f;
306 resources.world_buf.shadow_add = 1.0f;
307 return;
308 }
309 const Scene &scene = *scene_state.scene;
310
311 float3 direction_ws = scene.display.light_direction;
312 /* Turn the light in a way where it's more user friendly to control. */
313 std::swap(direction_ws.y, direction_ws.z);
314 direction_ws *= float3(-1, 1, -1);
315
316 std::array<float4, 6> planes = View::default_get().frustum_planes_get();
317
318 pass_data_.light_direction_ws = direction_ws;
319 pass_data_.far_plane = planes[2] * float4(-1, -1, -1, 1);
320 pass_data_.push_update();
321
322 /* Shadow direction. */
323 float4x4 view_matrix = draw::View::default_get().viewmat();
325 math::transform_direction(view_matrix, direction_ws), 0.0f);
326
327 /* Clamp to avoid overshadowing and shading errors. */
328 float focus = clamp_f(scene.display.shadow_focus, 0.0001f, 0.99999f);
329 resources.world_buf.shadow_shift = scene.display.shadow_shift;
330 resources.world_buf.shadow_focus = 1.0f - focus * (1.0f - resources.world_buf.shadow_shift);
331 resources.world_buf.shadow_mul = scene_state.shading.shadow_intensity;
332 resources.world_buf.shadow_add = 1.0f - resources.world_buf.shadow_mul;
333}
334
336{
337 if (!enabled_) {
338 return;
339 }
340
341#if DEBUG_SHADOW_VOLUME
343 DRWState depth_pass_state = state | DRW_STATE_DEPTH_LESS;
344 DRWState depth_fail_state = state | DRW_STATE_DEPTH_GREATER_EQUAL;
345#else
349#endif
350
351 if (use_raytracing_) {
352 raytrace_ps_.init();
353 raytrace_ps_.state_set(DRW_STATE_DEPTH_ALWAYS | DRW_STATE_STENCIL_ALWAYS |
355 raytrace_ps_.state_stencil(0xFF, 0xFF, 0xFF);
356 raytrace_ps_.shader_set(ShaderCache::get().shadow_raytrace.get());
357 raytrace_ps_.bind_texture("depth_tx", &resources.depth_tx);
358 raytrace_ps_.bind_texture("normal_tx", &gbuffer_normal_ref);
359 raytrace_ps_.bind_ubo("pass_data", pass_data_);
360 raytrace_ps_.bind_tlas("shadow_as", shadow_as_.get());
361 raytrace_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3);
362
363 return;
364 }
365
366 pass_ps_.init();
367 pass_ps_.state_set(depth_pass_state);
368 pass_ps_.state_stencil(0xFF, 0xFF, 0xFF);
369
370 fail_ps_.init();
371 fail_ps_.state_set(depth_fail_state);
372 fail_ps_.state_stencil(0xFF, 0xFF, 0xFF);
373
374 forced_fail_ps_.init();
375 forced_fail_ps_.state_set(depth_fail_state);
376 forced_fail_ps_.state_stencil(0xFF, 0xFF, 0xFF);
377
378 /* Stencil Shadow passes. */
379 for (bool manifold : {false, true}) {
380 PassMain::Sub *&ps = get_pass_ptr(PASS, manifold);
381 ps = &pass_ps_.sub(manifold ? "manifold" : "non_manifold");
382 ps->shader_set(ShaderCache::get().shadow_get(true, manifold));
383 ps->bind_ubo("pass_data", pass_data_);
384
385 for (PassType fail_type : {FAIL, FORCED_FAIL}) {
386 PassMain &ps_main = fail_type == FAIL ? fail_ps_ : forced_fail_ps_;
387
388 PassMain::Sub *&ps = get_pass_ptr(fail_type, manifold, false);
389 ps = &ps_main.sub(manifold ? "NoCaps.manifold" : "NoCaps.non_manifold");
390 ps->shader_set(ShaderCache::get().shadow_get(false, manifold, false));
391 ps->bind_ubo("pass_data", pass_data_);
392
393 PassMain::Sub *&caps_ps = get_pass_ptr(fail_type, manifold, true);
394 caps_ps = &ps_main.sub(manifold ? "Caps.manifold" : "Caps.non_manifold");
395 caps_ps->shader_set(ShaderCache::get().shadow_get(false, manifold, true));
396 caps_ps->bind_ubo("pass_data", pass_data_);
397 }
398 }
399}
400
402 ObjectRef &ob_ref,
403 ResourceHandleRange handle,
404 const bool has_transp_mat)
405{
406 if (!enabled_) {
407 return;
408 }
409
410 Object *ob = ob_ref.object;
411 if (use_raytracing_) {
412 if (needs_rt_update_) {
414 for (int i : IndexRange(ob_ref.instances_count())) {
415 shadow_as_->add_instance(*blas, ob_ref.object_to_world(i));
416 }
417 }
418 }
419 return;
420 }
421
422 bool is_manifold;
423 gpu::Batch *geom_shadow = DRW_cache_object_edge_detection_get(ob, &is_manifold);
424 if (geom_shadow == nullptr) {
425 return;
426 }
427
428#define DEBUG_CULLING 0
429#if DEBUG_CULLING
430 View view = View("View", DRW_view_default_get());
431 ShadowView shadow_view = ShadowView("ShadowView", view, pass_data_.light_direction_ws);
432 printf(
433 "%s culling : %s\n", ob->id.name, shadow_view.debug_object_culling(ob) ? "true" : "false");
434#endif
435
436 /* Shadow pass technique needs object to be have all its surface opaque. */
437 /* We cannot use the PASS technique on non-manifold object (see #76168). */
438 bool force_fail_pass = has_transp_mat || (!is_manifold && (scene_state.cull_state != 0));
439
440 PassType fail_type = force_fail_pass ? FORCED_FAIL : FAIL;
441
442 /* Unless we force the FAIL Method we add draw commands to both methods,
443 * then the visibility compute shader selects the one needed */
444
446 int tri_len = is_manifold ? 2 : 4;
447
448 if (!force_fail_pass) {
449 PassMain::Sub &ps = *get_pass_ptr(PASS, is_manifold);
450 ps.draw_expand(geom_shadow, prim, tri_len, 1, handle);
451 }
452
453 gpu::Batch *geom_faces = DRW_cache_object_surface_get(ob);
454 /* Caps. */
455 get_pass_ptr(fail_type, is_manifold, true)->draw_expand(geom_faces, prim, 2, 1, handle);
456 /* Sides extrusion. */
457 get_pass_ptr(fail_type, is_manifold, false)->draw_expand(geom_shadow, prim, tri_len, 1, handle);
458}
459
461{
462 if (use_raytracing_) {
463 shadow_as_->build();
464 }
465}
466
468 View &view,
469 SceneResources &resources,
470 gpu::Texture &depth_stencil_tx,
471 gpu::Texture &normal_tx,
472 int2 resolution,
473 bool force_fail_method)
474{
475 if (!enabled_) {
476 return;
477 }
478
479 if (use_raytracing_) {
480 gbuffer_normal_ref = &normal_tx;
481 pass_data_.pixel_size = view.screen_pixel_radius(resolution);
482 pass_data_.push_update();
483 fb_.ensure(GPU_ATTACHMENT_TEXTURE(&depth_stencil_tx));
484 fb_.bind();
485 manager.submit(raytrace_ps_, view);
486 return;
487 }
488
489 fb_.ensure(GPU_ATTACHMENT_TEXTURE(&depth_stencil_tx),
491 fb_.bind();
492
493 view_.setup(view, pass_data_.light_direction_ws, force_fail_method);
494
495 view_.set_mode(PASS);
496 manager.submit(pass_ps_, view_);
497 view_.set_mode(FAIL);
498 manager.submit(fail_ps_, view_);
499 view_.set_mode(FORCED_FAIL);
500 manager.submit(forced_fail_ps_, view_);
501}
502
504{
505 return DEBUG_SHADOW_VOLUME;
506}
507
508} // namespace blender::workbench
General operations, lookup, etc. for blender objects.
#define GPU_ATTACHMENT_TEXTURE(_texture)
blender::gpu::TopLevelAS * GPU_ray_tracing_tlas_alloc(const char *name)
#define UNPACK4(a)
#define BLI_assert_unreachable()
constexpr IndexRange()=default
void submit(PassSimple &pass, View &view)
float4x4 object_to_world(int instance_index) const
View(const char *name, int view_len=1, bool procedural=false)
Definition draw_view.hh:70
static View & default_get()
Definition draw_view.cc:317
const float4x4 & viewmat(int view_id=0) const
Definition draw_view.hh:136
static float screen_pixel_radius(const float4x4 &wininv, bool is_perspective, const int2 &extent)
Definition draw_view.cc:349
virtual VisibilityBuf & get_visibility_buffer()
Definition draw_view.cc:312
std::array< float3, 8 > frustum_corners_get(int view_id=0) const
Definition draw_view.cc:337
std::array< float4, 6 > frustum_planes_get(int view_id=0) const
Definition draw_view.cc:327
void sync(const float4x4 &view_mat, const float4x4 &win_mat, int view_id=0)
Definition draw_view.cc:27
void shader_set(gpu::Shader *shader)
PassBase< DrawCommandBufType > & sub(const char *name)
Definition draw_pass.hh:701
void draw_expand(gpu::Batch *batch, GPUPrimType primitive_type, uint primitive_len, uint instance_len, uint vertex_len, uint vertex_first, ResourceIDRange res_id={}, uint custom_id=0)
Definition draw_pass.hh:938
void bind_ubo(const char *name, gpu::UniformBuf *buffer)
detail::PassBase< command::DrawMultiBuf > Sub
Definition draw_pass.hh:509
void init(const SceneState &scene_state, SceneResources &resources)
void object_sync(SceneState &scene_state, ObjectRef &ob_ref, ResourceHandleRange handle, const bool has_transp_mat)
void draw(Manager &manager, View &view, SceneResources &resources, gpu::Texture &depth_stencil_tx, gpu::Texture &normal_tx, int2 resolution, bool force_fail_method)
void sync(SceneResources &resources)
#define DRW_VISIBILITY_GROUP_SIZE
#define DRW_VIEW_UBO_SLOT
float dot(VecOp< float, D >, VecOp< float, D >) RET
const int state
std::array< VecBase< T, 3 >, 8 > corners(const Bounds< VecBase< T, 3 > > &bounds)
gpu::BottomLevelAS * DRW_cache_object_surface_blas_get(Object *ob)
detail::Pass< command::DrawMultiBuf > PassMain
gpu::Batch * DRW_cache_object_surface_get(Object *ob)
StorageArrayBuffer< ObjectBounds, 128 > ObjectBoundsBuf
Definition draw_view.hh:33
gpu::Batch * DRW_cache_object_edge_detection_get(Object *ob, bool *r_is_manifold)
StorageArrayBuffer< ObjectInfos, 128 > ObjectInfosBuf
Definition draw_view.hh:34
StorageArrayBuffer< uint, 4, true > VisibilityBuf
Definition draw_view.hh:35
std::unique_ptr< TopLevelAS, TopLevelASDeleter > TopLevelASPtr
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
AxisSigned cross(const AxisSigned a, const AxisSigned b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
VecBase< T, 3 > transform_direction(const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &direction)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
unsigned int uint
Definition BKE_text.h:55
MINLINE int max_ii(int a, int b)
MatBase< float, 4, 4 > float4x4
void GPU_compute_dispatch(gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_shader_uniform_1b(gpu::Shader *sh, const char *name, bool value)
int GPU_shader_get_ssbo_binding(gpu::Shader *shader, const char *name)
void GPU_storagebuf_clear(gpu::StorageBuf *ssbo, uint32_t clear_value)
VecBase< float, 4 > float4
unsigned int uint32_t
Definition BKE_text.h:81
VecBase< int32_t, 2 > int2
VecBase< int32_t, 3 > int3
void GPU_memory_barrier(GPUBarrier barrier)
Definition gpu_state.cc:305
BMesh const char void * data
void GPU_shader_uniform_3fv(gpu::Shader *sh, const char *name, const float data[3])
void GPU_shader_bind(gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_shader_uniform_1i(gpu::Shader *sh, const char *name, int value)
@ GPU_BARRIER_SHADER_STORAGE
Definition GPU_state.hh:51
@ DRW_STATE_BLEND_ADD_FULL
Definition draw_state.hh:55
@ DRW_STATE_WRITE_COLOR
Definition draw_state.hh:32
@ DRW_STATE_STENCIL_ALWAYS
Definition draw_state.hh:48
@ DRW_STATE_DEPTH_ALWAYS
Definition draw_state.hh:38
@ DRW_STATE_DEPTH_LESS
Definition draw_state.hh:39
@ DRW_STATE_WRITE_STENCIL
Definition draw_state.hh:34
@ DRW_STATE_DEPTH_GREATER_EQUAL
Definition draw_state.hh:43
@ DRW_STATE_WRITE_STENCIL_SHADOW_FAIL
Definition draw_state.hh:36
@ DRW_STATE_WRITE_STENCIL_SHADOW_PASS
Definition draw_state.hh:35
void GPU_storagebuf_bind(gpu::StorageBuf *ssbo, int slot)
void GPU_uniformbuf_bind(gpu::UniformBuf *ubo, int slot)
void GPU_debug_group_end()
Definition gpu_debug.cc:34
MINLINE uint divide_ceil_u(uint a, uint b)
int GPU_shader_get_ubo_binding(gpu::Shader *shader, const char *name)
std::optional< Bounds< float3 > > BKE_object_boundbox_get(const Object *ob)
Definition object.cc:3726
MINLINE uint ceil_to_multiple_u(uint a, uint b)
VecBase< float, 3 > float3
void GPU_debug_group_begin(const char *name)
Definition gpu_debug.cc:23
MINLINE float clamp_f(float value, float min, float max)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ustring name
Definition graph/node.h:178
char name[258]
Definition DNA_ID.h:433
struct SceneDisplay display
UniformBuffer< WorldData > world_buf
float w
Definition sky_math.h:225
#define DEBUG_SHADOW_VOLUME