Blender V4.3
draw_debug_create_info.hh File Reference

Go to the source code of this file.

Debug print

Allows print() function to have logging support inside shaders.

 uint
 
 drw_debug_print_buf []
 
 define ("DRW_DEBUG_PRINT") .typedef_source("draw_shader_shared.hh") .storage_buf(DRW_DEBUG_PRINT_SLOT
 
GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type do_static_compilation (true) .typedef_source("draw_shader_shared.hh") .storage_buf(DRW_DEBUG_PRINT_SLOT
 
GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type drw_debug_print_buf[] vertex_out (draw_debug_print_display_iface) .fragment_out(0
 
GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type drw_debug_print_buf[] out_color push_constant (Type::VEC2, "viewport_size") .vertex_source("draw_debug_print_display_vert.glsl") .fragment_source("draw_debug_print_display_frag.glsl")
 

Debug draw shapes

Allows to draw lines and points just like the DRW_debug module functions.

 DRWDebugVert
 
 drw_debug_verts_buf []
 
 define ("DRW_DEBUG_DRAW") .typedef_source("draw_shader_shared.hh") .storage_buf(DRW_DEBUG_DRAW_SLOT
 
GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type drw_debug_verts_buf[] vertex_out (draw_debug_draw_display_iface) .fragment_out(0
 
GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type drw_debug_verts_buf[] out_color push_constant (Type::MAT4, "persmat") .vertex_source("draw_debug_draw_display_vert.glsl") .fragment_source("draw_debug_draw_display_frag.glsl")
 

Function Documentation

◆ define() [1/2]

define ( "DRW_DEBUG_DRAW" )

◆ define() [2/2]

define ( "DRW_DEBUG_PRINT" )

◆ do_static_compilation()

GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type do_static_compilation ( true )

Colors, weights, and Circle of confusion radii for the 4 pixels to scatter. Scaling factor for the bokeh distance. Sprite pixel position with origin at sprite center. In pixels.

◆ push_constant() [1/2]

GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type drw_debug_verts_buf[] out_color push_constant ( Type::MAT4 ,
"persmat"  )

◆ push_constant() [2/2]

GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type drw_debug_print_buf[] out_color push_constant ( Type::VEC2 ,
"viewport_size"  )

◆ vertex_out() [1/2]

GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type drw_debug_verts_buf[] vertex_out ( draw_debug_draw_display_iface )

◆ vertex_out() [2/2]

GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type drw_debug_print_buf[] vertex_out ( draw_debug_print_display_iface )

Variable Documentation

◆ drw_debug_print_buf

drw_debug_print_buf[]

Definition at line 17 of file draw_debug_create_info.hh.

◆ drw_debug_verts_buf

drw_debug_verts_buf[]

Definition at line 45 of file draw_debug_create_info.hh.

◆ DRWDebugVert

GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type DRWDebugVert

Definition at line 44 of file draw_debug_create_info.hh.

◆ uint

GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type uint

Definition at line 17 of file draw_debug_create_info.hh.