30struct GpencilBatchCache;
37#define GPENCIL_PIXEL_FACTOR 2000.0f
40#define GPENCIL_VBO_BLOCK_SIZE 128
42#define GP_MAX_MASKBITS 256
73 std::unique_ptr<PassSimple>
vfx_ps = std::make_unique<PassSimple>(
"vfx");
318 return "Grease Pencil";
337 bool is_used_as_layer_mask_in_viewlayer(const
GreasePencil &grease_pencil,
338 const
bke::greasepencil::
Layer &mask_layer,
342 bool use_layer_in_render(const
GreasePencil &grease_pencil,
343 const
bke::greasepencil::
Layer &layer,
345 bool &r_is_used_as_mask);
350 void antialiasing_init();
351 void antialiasing_draw(
Manager &manager);
353 struct VfxFramebufferRef {
378 void vfx_sync(
Object *ob, tObject *tgp_ob);
380 static void material_pool_free(
void *storage)
382 MaterialPool *matpool = (MaterialPool *)storage;
386 static void light_pool_free(
void *storage)
388 LightPool *lightpool = (LightPool *)storage;
405 bool is_stroke_order_3d,
415 bool is_used_as_mask,
425 bool is_vertex_mode);
Low-level operations for grease pencil.
#define BLI_BITMAP_SIZE(_num)
void BLI_memblock_destroy(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1)
#define BLI_memblock_create(elem_size)
#define GPENCIL_MATERIAL_BUFFER_LEN
#define GPENCIL_LIGHT_BUFFER_LEN
BLI_INLINE float fb(float length, float L)
void gpencil_light_ambient_add(LightPool *lightpool, const float color[3])
void gpencil_object_cache_sort(Instance *inst)
void gpencil_light_pool_populate(LightPool *lightpool, Object *ob)
LightPool * gpencil_light_pool_add(Instance *inst)
tLayer * grease_pencil_layer_cache_add(Instance *inst, const Object *ob, const bke::greasepencil::Layer &layer, const int onion_id, const bool is_used_as_mask, tObject *tgp_ob)
void gpencil_material_resources_get(MaterialPool *first_pool, int mat_id, gpu::Texture **r_tex_stroke, gpu::Texture **r_tex_fill, gpu::UniformBuf **r_ubo_mat)
struct GpencilBatchCache * gpencil_batch_cache_get(struct Object *ob, int cfra)
tLayer * grease_pencil_layer_cache_get(tObject *tgp_ob, int layer_id, const bool skip_onion)
LightPool * gpencil_light_pool_create(Instance *inst, Object *)
MaterialPool * gpencil_material_pool_create(Instance *inst, Object *ob, int *ofs, const bool is_vertex_mode)
tObject * gpencil_object_cache_add(Instance *inst, Object *ob, const bool is_stroke_order_3d, const Bounds< float3 > bounds)
detail::Pass< command::DrawCommandBuf > PassSimple
MatBase< float, 4, 4 > float4x4
VecBase< float, 2 > float2
VecBase< float, 3 > float3
static constexpr GPUSamplerState internal_sampler()
struct Instance * instance
TextureFromPool smaa_edge_tx
StringRefNull name_get() final
bool do_onion_only_active_object
bool snapshot_buffer_dirty
LightPool * shadeless_light_pool
Framebuffer gpencil_pass_fb
gpu::Batch * stroke_batch
LightPool * last_light_pool
PassSimple smaa_resolve_ps
Framebuffer smaa_weight_fb
Texture snapshot_depth_tx
PassSimple smaa_weight_ps
struct BLI_memblock * gp_object_pool
TextureFromPool color_object_tx
tLayer_Pool * gp_layer_pool
float vertex_paint_opacity
draw::detail::SubPassVector< tLayer > tLayer_Pool
TextureFromPool mask_color_tx
struct ViewLayer * view_layer
float fade_3d_object_opacity
struct blender::draw::gpencil::Instance::@053346266241271021036107110366172237215334041065 sbuffer_tobjects
bool force_stroke_order_3d
gpu::FrameBuffer * scene_fb
struct BLI_memblock * gp_material_pool
const DRWContext * draw_ctx
PassSimple mask_invert_ps
struct blender::draw::gpencil::Instance::@236154265015220156065132174366266070164251065066 tobjects
float fade_gp_object_opacity
TextureFromPool mask_depth_tx
bool use_multiedit_lines_only
Texture snapshot_reveal_tx
TextureFromPool color_layer_tx
float4x4 object_bound_mat
MaterialPool * last_material_pool
static float2 antialiasing_sample_get(int sample_index, int sample_count)
float v3d_single_color[3]
struct blender::draw::gpencil::Instance::@236154265015220156065132174366266070164251065066 tobjects_infront
Texture snapshot_color_tx
void object_sync(ObjectRef &ob_ref, Manager &manager) final
TextureFromPool reveal_layer_tx
TextureFromPool reveal_tx
TextureFromPool reveal_object_tx
gpu::Texture * scene_depth_tx
draw::detail::SubPassVector< tVfx > tVfx_Pool
LightPool * global_light_pool
TextureFromPool smaa_weight_tx
Framebuffer accumulation_fb
PassSimple merge_depth_ps
struct BLI_memblock * gp_maskbit_pool
struct BLI_memblock * gp_light_pool
void antialiasing_accumulate(Manager &manager, float alpha)
gpLight light_data[GPENCIL_LIGHT_BUFFER_LEN]
gpu::Texture * tex_fill[GPENCIL_MATERIAL_BUFFER_LEN]
gpu::Texture * tex_stroke[GPENCIL_MATERIAL_BUFFER_LEN]
gpMaterial mat_data[GPENCIL_MATERIAL_BUFFER_LEN]
std::unique_ptr< PassSimple > geom_ps
BLI_bitmap * mask_invert_bits
std::unique_ptr< PassSimple > blend_ps
struct blender::draw::gpencil::tObject::@205301145252027033255155341114207373222070270161 layers
struct blender::draw::gpencil::tObject::@173025115035047336003051253055014360144006015207 vfx
std::unique_ptr< PassSimple > vfx_ps
gpu::FrameBuffer ** target_fb