Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/shaders/common_debug_draw_lib.glsl
| Show All 11 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Internals | /** \name Internals | ||||
| * \{ */ | * \{ */ | ||||
| uint drw_debug_start_draw(uint v_needed) | uint drw_debug_start_draw(uint v_needed) | ||||
| { | { | ||||
| uint vertid = atomicAdd(drw_debug_draw_v_count, v_needed); | uint vertid = atomicAdd(drw_debug_draw_v_count, v_needed); | ||||
| /* NOTE: Skip the header manually. */ | vertid += drw_debug_draw_offset; | ||||
| vertid += 1; | |||||
| return vertid; | return vertid; | ||||
| } | } | ||||
| uint drw_debug_color_pack(vec4 color) | uint drw_debug_color_pack(vec4 color) | ||||
| { | { | ||||
| color = clamp(color, 0.0, 1.0); | color = clamp(color, 0.0, 1.0); | ||||
| uint result = 0; | uint result = 0; | ||||
| result |= uint(color.x * 255.0) << 0u; | result |= uint(color.x * 255.0) << 0u; | ||||
| ▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines | |||||