|
Blender V5.3
|
Namespaces | |
| namespace | blender |
Classes | |
| struct | Engine |
| struct | GPENCIL_Data |
| struct | Instance |
| struct | LightPool |
| struct | MaterialPool |
| class | ShaderCache |
| struct | SortInfo |
| struct | tLayer |
| struct | tObject |
| struct | tVfx |
Typedefs | |
| using | StaticShader = gpu::StaticShader |
Functions | |
| static float | erfinv_approx (const float x) |
| struct GpencilBatchCache * | gpencil_batch_cache_get (struct Object *ob, int cfra) |
| static void | remap_depth (const View &view, MutableSpan< float > pix_z) |
| static void | render_set_view (RenderEngine *engine, const Depsgraph *depsgraph, const float2 aa_offset=float2{0.0f}) |
| static void | render_init_buffers (const DRWContext *draw_ctx, Instance &inst, RenderEngine *engine, RenderLayer *render_layer, const rcti *rect, const bool use_separated_pass) |
| static void | render_result_z (const DRWContext *draw_ctx, RenderLayer *rl, const char *viewname, Instance &instance, const rcti *rect) |
| static void | render_result_color (ImBuf *ibuf, Instance &instance, const rcti *rect) |
| static void | cdf_from_curvemapping (const CurveMapping &curve, Array< float > &cdf) |
| static void | cdf_invert (Array< float > &cdf, Array< float > &inverted_cdf) |
| static float | shutter_time_to_scene_time (const int shutter_position, const float shutter_time, const float frame_time, float time) |
| static void | render_frame (RenderEngine *engine, Depsgraph *depsgraph, const DRWContext *draw_ctx, RenderLayer *render_layer, const rcti rect, gpencil::Instance &inst, Manager &manager, const bool separated_pass) |
| static bool | effect_is_active (ShaderFxData *fx, bool is_edit, bool is_viewport) |
Layer | |
| static float | grease_pencil_layer_final_opacity_get (const Instance *inst, const Object *ob, const GreasePencil &grease_pencil, const bke::greasepencil::Layer &layer) |
| static float4 | grease_pencil_layer_final_tint_and_alpha_get (const Instance *inst, const GreasePencil &grease_pencil, const int onion_id, float *r_alpha) |
| static void | grease_pencil_layer_random_color_get (const Object *ob, const bke::greasepencil::Layer &layer, float r_color[3]) |
| tLayer * | grease_pencil_layer_cache_get (tObject *tgp_ob, int layer_id, const bool skip_onion) |
| 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) |
Material | |
| static MaterialPool * | gpencil_material_pool_add (Instance *inst) |
| static gpu::Texture * | gpencil_image_texture_get (blender::Image *image, bool *r_alpha_premult) |
| static gpu::Texture * | gpencil_gradient_texture_create (const ColorBand *coba) |
| static void | gpencil_uv_transform_get (const float ofs[2], const float scale[2], const float rotation, float r_rot_scale[2][2], float r_offset[2]) |
| static void | gpencil_shade_color (float color[3]) |
| static MaterialGPencilStyle * | gpencil_viewport_material_overrides (Instance *inst, Object *ob, int color_type, MaterialGPencilStyle *gp_style, const eV3DShadingLightingMode lighting_mode) |
| MaterialPool * | gpencil_material_pool_create (Instance *inst, Object *ob, int *ofs, const bool is_vertex_mode) |
| 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) |
Lights | |
| LightPool * | gpencil_light_pool_add (Instance *inst) |
| void | gpencil_light_ambient_add (LightPool *lightpool, const float color[3]) |
| static float | light_power_get (const Light *la) |
| void | gpencil_light_pool_populate (LightPool *lightpool, Object *ob) |
| LightPool * | gpencil_light_pool_create (Instance *inst, Object *) |
Object | |
| typedef signed char | int8_t |
| typedef signed short | int16_t |
| typedef signed int | int32_t |
| typedef unsigned char | uint8_t |
| typedef unsigned short | uint16_t |
| typedef unsigned int | uint32_t |
| typedef __int64 | int64_t |
| typedef unsigned __int64 | uint64_t |
| typedef int8_t | int_least8_t |
| typedef int16_t | int_least16_t |
| typedef int32_t | int_least32_t |
| typedef int64_t | int_least64_t |
| typedef uint8_t | uint_least8_t |
| typedef uint16_t | uint_least16_t |
| typedef uint32_t | uint_least32_t |
| typedef uint64_t | uint_least64_t |
| typedef int8_t | int_fast8_t |
| typedef int16_t | int_fast16_t |
| typedef int32_t | int_fast32_t |
| typedef int64_t | int_fast64_t |
| typedef uint8_t | uint_fast8_t |
| typedef uint16_t | uint_fast16_t |
| typedef uint32_t | uint_fast32_t |
| typedef uint64_t | uint_fast64_t |
| typedef _W64 int | intptr_t |
| typedef _W64 unsigned int | uintptr_t |
| typedef int64_t | intmax_t |
| typedef uint64_t | uintmax_t |
| typedef unsigned int | uint |
| typedef unsigned short | ushort |
| typedef unsigned long | ulong |
| typedef unsigned char | uchar |
| typedef int(*) | CompareFn(const void *, const void *) |
| template<class T> | |
| constexpr bool | _bli_always_false = false |
| tObject * | gpencil_object_cache_add (Instance *inst, Object *ob, const bool is_stroke_order_3d, const Bounds< float3 > bounds) |
| void | _BLI_assert_print_pos (const char *file, int line, const char *function, const char *id) |
| void | _BLI_assert_print_extra (const char *str) |
| void | _BLI_assert_print_backtrace () |
| void | _BLI_assert_abort () |
| void | _BLI_assert_unreachable_print (const char *file, int line, const char *function) |
| void | init_sort_info (struct SortInfo *si, CompareFn func) |
| list_node * | merge_lists (list_node *first, list_node *second, CompareFn func) |
| BLI_INLINE list_node * | sweep_up (struct SortInfo *si, list_node *list, unsigned int upto) |
| BLI_INLINE void | insert_list (struct SortInfo *si, list_node *list, unsigned int rank) |
| BLI_INLINE list_node * | list_sort_do (list_node *list, CompareFn func) |
| static int | gpencil_tobject_dist_sort (const void *a, const void *b) |
| void | gpencil_object_cache_sort (Instance *inst) |
| typedef int(*) blender::draw::gpencil::CompareFn(const void *, const void *) |
Definition at line 75 of file gpencil_cache_utils.cc.
| typedef signed short blender::draw::gpencil::int16_t |
Definition at line 77 of file gpencil_cache_utils.cc.
| typedef signed int blender::draw::gpencil::int32_t |
Definition at line 78 of file gpencil_cache_utils.cc.
| typedef __int64 blender::draw::gpencil::int64_t |
Definition at line 90 of file gpencil_cache_utils.cc.
| typedef signed char blender::draw::gpencil::int8_t |
Definition at line 76 of file gpencil_cache_utils.cc.
Definition at line 106 of file gpencil_cache_utils.cc.
Definition at line 107 of file gpencil_cache_utils.cc.
Definition at line 108 of file gpencil_cache_utils.cc.
Definition at line 105 of file gpencil_cache_utils.cc.
Definition at line 96 of file gpencil_cache_utils.cc.
Definition at line 97 of file gpencil_cache_utils.cc.
Definition at line 98 of file gpencil_cache_utils.cc.
Definition at line 95 of file gpencil_cache_utils.cc.
Definition at line 124 of file gpencil_cache_utils.cc.
| typedef _W64 int blender::draw::gpencil::intptr_t |
Definition at line 119 of file gpencil_cache_utils.cc.
Definition at line 15 of file gpencil_shader.hh.
| typedef unsigned char blender::draw::gpencil::uchar |
Definition at line 58 of file gpencil_cache_utils.cc.
| typedef unsigned int blender::draw::gpencil::uint |
Definition at line 55 of file gpencil_cache_utils.cc.
| typedef unsigned short blender::draw::gpencil::uint16_t |
Definition at line 80 of file gpencil_cache_utils.cc.
| typedef unsigned int blender::draw::gpencil::uint32_t |
Definition at line 81 of file gpencil_cache_utils.cc.
| typedef unsigned __int64 blender::draw::gpencil::uint64_t |
Definition at line 91 of file gpencil_cache_utils.cc.
| typedef unsigned char blender::draw::gpencil::uint8_t |
Definition at line 79 of file gpencil_cache_utils.cc.
Definition at line 110 of file gpencil_cache_utils.cc.
Definition at line 111 of file gpencil_cache_utils.cc.
Definition at line 112 of file gpencil_cache_utils.cc.
Definition at line 109 of file gpencil_cache_utils.cc.
Definition at line 100 of file gpencil_cache_utils.cc.
Definition at line 101 of file gpencil_cache_utils.cc.
Definition at line 102 of file gpencil_cache_utils.cc.
Definition at line 99 of file gpencil_cache_utils.cc.
Definition at line 125 of file gpencil_cache_utils.cc.
| typedef _W64 unsigned int blender::draw::gpencil::uintptr_t |
Definition at line 120 of file gpencil_cache_utils.cc.
| typedef unsigned long blender::draw::gpencil::ulong |
Definition at line 57 of file gpencil_cache_utils.cc.
| typedef unsigned short blender::draw::gpencil::ushort |
Definition at line 56 of file gpencil_cache_utils.cc.
| void blender::draw::gpencil::_BLI_assert_abort | ( | ) |
| void blender::draw::gpencil::_BLI_assert_print_backtrace | ( | ) |
| void blender::draw::gpencil::_BLI_assert_print_extra | ( | const char * | str | ) |
| void blender::draw::gpencil::_BLI_assert_print_pos | ( | const char * | file, |
| int | line, | ||
| const char * | function, | ||
| const char * | id ) |
| void blender::draw::gpencil::_BLI_assert_unreachable_print | ( | const char * | file, |
| int | line, | ||
| const char * | function ) |
|
static |
Definition at line 236 of file gpencil_render.cc.
References blender::BKE_curvemapping_evaluateF(), blender::BLI_assert(), cdf_from_curvemapping(), float, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::IndexRange(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), and blender::x.
Referenced by cdf_from_curvemapping(), and render_frame().
|
static |
Definition at line 254 of file gpencil_render.cc.
References blender::BLI_assert(), cdf_invert(), blender::clamp_f(), blender::IndexRange::drop_front(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), float, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), and blender::x.
Referenced by cdf_invert(), and render_frame().
|
static |
Definition at line 26 of file gpencil_shader_fx.cc.
References effect_is_active(), blender::eShaderFxMode_Editmode, blender::eShaderFxMode_Realtime, blender::eShaderFxMode_Render, and blender::ShaderFxData::mode.
Referenced by effect_is_active().
Definition at line 138 of file gpencil_antialiasing.cc.
References erfinv_approx(), fabsf, logf, blender::math::min(), sqrtf, w(), and blender::x.
Referenced by blender::draw::gpencil::Instance::antialiasing_sample_get(), and erfinv_approx().
| struct GpencilBatchCache * blender::draw::gpencil::gpencil_batch_cache_get | ( | struct Object * | ob, |
| int | cfra ) |
References gpencil_batch_cache_get(), gpencil_light_ambient_add(), gpencil_light_pool_add(), gpencil_light_pool_create(), gpencil_light_pool_populate(), gpencil_material_pool_create(), gpencil_material_resources_get(), gpencil_object_cache_add(), gpencil_object_cache_sort(), grease_pencil_layer_cache_add(), grease_pencil_layer_cache_get(), and layer.
Referenced by gpencil_batch_cache_get().
|
static |
Definition at line 60 of file gpencil_draw_data.cc.
References blender::BKE_colorband_evaluate_table_rgba(), blender::data, blender::DRW_manager_get(), gpencil_gradient_texture_create(), blender::GPU_texture_create_2d(), blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::draw::Manager::hold_texture(), blender::IndexRange::IndexRange(), and blender::linearrgb_to_srgb_v4().
Referenced by gpencil_gradient_texture_create(), and gpencil_material_pool_create().
|
static |
Definition at line 48 of file gpencil_draw_data.cc.
References blender::BKE_image_acquire_gpu_texture(), blender::DRW_manager_get(), gpencil_image_texture_get(), blender::draw::Manager::hold_texture(), and blender::IMA_ALPHA_PREMUL.
Referenced by gpencil_image_texture_get(), and gpencil_material_pool_create().
| void blender::draw::gpencil::gpencil_light_ambient_add | ( | LightPool * | lightpool, |
| const float | color[3] ) |
Definition at line 425 of file gpencil_draw_data.cc.
References blender::copy_v3_v3(), GP_LIGHT_TYPE_AMBIENT, gpencil_light_ambient_add(), GPENCIL_LIGHT_BUFFER_LEN, gpLight::light_color, blender::draw::gpencil::LightPool::light_data, blender::draw::gpencil::LightPool::light_used, and gpLight::type.
Referenced by gpencil_batch_cache_get(), gpencil_light_ambient_add(), and blender::draw::gpencil::Instance::init().
Definition at line 412 of file gpencil_draw_data.cc.
References blender::BLI_memblock_alloc(), blender::draw::gpencil::Instance::gp_light_pool, gpencil_light_pool_add(), GPU_uniformbuf_create, blender::draw::gpencil::Instance::last_light_pool, gpLight::light_color, blender::draw::gpencil::LightPool::light_data, blender::draw::gpencil::LightPool::light_used, and blender::draw::gpencil::LightPool::ubo.
Referenced by gpencil_batch_cache_get(), gpencil_light_pool_add(), gpencil_light_pool_create(), and blender::draw::gpencil::Instance::init().
Creates a single pool containing all lights assigned (light linked) for a given object.
Definition at line 498 of file gpencil_draw_data.cc.
References gpencil_light_pool_add(), gpencil_light_pool_create(), and blender::draw::gpencil::Instance::last_light_pool.
Referenced by gpencil_batch_cache_get(), and gpencil_light_pool_create().
Definition at line 454 of file gpencil_draw_data.cc.
References blender::copy_v3_v3(), blender::copy_v4_v4(), blender::DRW_object_get_data_for_drawing(), float, GPENCIL_LIGHT_BUFFER_LEN, gpencil_light_pool_populate(), blender::if(), blender::LA_AREA, blender::LA_SPOT, blender::LA_SUN, gpLight::light_color, blender::draw::gpencil::LightPool::light_data, light_power_get(), blender::draw::gpencil::LightPool::light_used, blender::mul_v3_fl(), gpLight::position, gpLight::right, and blender::eevee::LightData::type.
Referenced by gpencil_batch_cache_get(), gpencil_light_pool_populate(), and blender::draw::gpencil::Instance::object_sync().
|
static |
Definition at line 36 of file gpencil_draw_data.cc.
References blender::BLI_memblock_alloc(), blender::draw::gpencil::Instance::gp_material_pool, gpencil_material_pool_add(), GPU_uniformbuf_create, blender::draw::gpencil::Instance::last_material_pool, blender::draw::gpencil::MaterialPool::mat_data, blender::draw::gpencil::MaterialPool::next, blender::draw::gpencil::MaterialPool::ubo, and blender::draw::gpencil::MaterialPool::used_count.
Referenced by gpencil_material_pool_add(), and gpencil_material_pool_create().
| MaterialPool * blender::draw::gpencil::gpencil_material_pool_create | ( | Instance * | inst, |
| Object * | ob, | ||
| int * | ofs, | ||
| bool | is_vertex_mode ) |
Creates a linked list of material pool containing all materials assigned for a given object. We merge the material pools together if object does not contain a huge amount of materials. Also return an offset to the first material of the object in the UBO.
Definition at line 194 of file gpencil_draw_data.cc.
References blender::MaterialGPencilStyle::alignment_mode, gpMaterial::alignment_rot, blender::MaterialGPencilStyle::alignment_rotation, blender::BKE_gpencil_material_settings(), blender::BKE_object_material_used_with_fallback_eval(), blender::copy_v4_v4(), cosf, gpMaterial::fill_color, blender::MaterialGPencilStyle::fill_rgba, blender::MaterialGPencilStyle::fill_style, gpMaterial::fill_texture_mix, gpMaterial::fill_uv_offset, gpMaterial::fill_uv_rot_scale, blender::MaterialGPencilStyle::flag, gpMaterial::flag, blender::float_as_uint(), GP_DOTS_PLACEMENT_MODE_COUNT, GP_DOTS_PLACEMENT_MODE_DENSITY, GP_DOTS_PLACEMENT_MODE_RADIUS, GP_DOTS_USE_RANDOMIZATION, GP_FILL_GRADIENT_RADIAL, GP_FILL_GRADIENT_USE, GP_FILL_HOLDOUT, GP_FILL_TEXTURE_CLIP, GP_FILL_TEXTURE_PREMUL, GP_FILL_TEXTURE_USE, GP_FLAG_NONE, blender::GP_MATERIAL_DISABLE_STENCIL, blender::GP_MATERIAL_FILL_STYLE_GRADIENT, blender::GP_MATERIAL_FILL_STYLE_TEXTURE, blender::GP_MATERIAL_FOLLOW_FIXED, blender::GP_MATERIAL_FOLLOW_OBJ, blender::GP_MATERIAL_FOLLOW_PATH, blender::GP_MATERIAL_GRADIENT_RADIAL, blender::GP_MATERIAL_IS_FILL_HOLDOUT, blender::GP_MATERIAL_IS_STROKE_HOLDOUT, blender::GP_MATERIAL_MODE_DOT, blender::GP_MATERIAL_MODE_LINE, blender::GP_MATERIAL_PLACEMENT_COUNT, blender::GP_MATERIAL_PLACEMENT_DENSITY, blender::GP_MATERIAL_PLACEMENT_RADIUS, blender::GP_MATERIAL_STROKE_STYLE_TEXTURE, blender::GP_MATERIAL_TEX_CLAMP, blender::GP_MATERIAL_USE_DOTS_RANDOMIZATION, GP_STROKE_ALIGNMENT_FIXED, GP_STROKE_ALIGNMENT_OBJECT, GP_STROKE_ALIGNMENT_STROKE, GP_STROKE_DOTS, GP_STROKE_HOLDOUT, GP_STROKE_OVERLAP, GP_STROKE_TEXTURE_PREMUL, GP_STROKE_TEXTURE_USE, gpencil_gradient_texture_create(), gpencil_image_texture_get(), GPENCIL_MATERIAL_BUFFER_LEN, gpencil_material_pool_add(), gpencil_material_pool_create(), gpencil_uv_transform_get(), gpencil_viewport_material_overrides(), blender::MaterialGPencilStyle::gradient, blender::MaterialGPencilStyle::gradient_type, blender::MaterialGPencilStyle::ima, blender::draw::gpencil::Instance::last_material_pool, blender::View3DShading::light, blender::draw::gpencil::MaterialPool::mat_data, blender::MaterialGPencilStyle::mix_factor, blender::MaterialGPencilStyle::mix_stroke_factor, blender::MaterialGPencilStyle::mode, blender::draw::gpencil::MaterialPool::next, blender::MaterialGPencilStyle::placement_count, blender::MaterialGPencilStyle::placement_density, blender::MaterialGPencilStyle::placement_mode, blender::MaterialGPencilStyle::placement_radius_spacing, blender::MaterialGPencilStyle::random_hue_factor, blender::MaterialGPencilStyle::random_noise_scale, gpMaterial::random_packed, blender::MaterialGPencilStyle::random_rotation_factor, blender::MaterialGPencilStyle::random_saturation_factor, blender::MaterialGPencilStyle::random_size_factor, blender::MaterialGPencilStyle::random_strength_factor, blender::MaterialGPencilStyle::random_value_factor, blender::View3D::shading, blender::MaterialGPencilStyle::sima, sinf, gpMaterial::stroke_color, blender::MaterialGPencilStyle::stroke_rgba, blender::MaterialGPencilStyle::stroke_style, gpMaterial::stroke_texture_mix, gpMaterial::stroke_u_scale, blender::draw::gpencil::MaterialPool::tex_fill, blender::draw::gpencil::MaterialPool::tex_stroke, blender::MaterialGPencilStyle::texture_angle, blender::MaterialGPencilStyle::texture_offset, blender::MaterialGPencilStyle::texture_pixsize, blender::MaterialGPencilStyle::texture_scale, blender::unit_float_to_ushort_clamp(), blender::draw::gpencil::MaterialPool::used_count, blender::draw::gpencil::Instance::v3d, blender::draw::gpencil::Instance::v3d_color_type, blender::V3D_LIGHTING_STUDIO, and blender::V3D_SHADING_VERTEX_COLOR.
Referenced by gpencil_batch_cache_get(), and gpencil_material_pool_create().
| void blender::draw::gpencil::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 ) |
Definition at line 384 of file gpencil_draw_data.cc.
References blender::BLI_assert(), GPENCIL_MATERIAL_BUFFER_LEN, gpencil_material_resources_get(), blender::draw::gpencil::MaterialPool::next, blender::draw::gpencil::MaterialPool::tex_fill, blender::draw::gpencil::MaterialPool::tex_stroke, and blender::draw::gpencil::MaterialPool::ubo.
Referenced by gpencil_batch_cache_get(), and gpencil_material_resources_get().
| tObject * blender::draw::gpencil::gpencil_object_cache_add | ( | Instance * | inst, |
| Object * | ob, | ||
| const bool | is_stroke_order_3d, | ||
| const Bounds< float3 > | bounds ) |
Definition at line 43 of file gpencil_cache_utils.cc.
References blender::BLI_memblock_alloc(), blender::draw::gpencil::tObject::camera_z, blender::draw::gpencil::Instance::camera_z_axis, blender::dot_v3v3(), blender::draw::gpencil::Instance::gp_object_pool, gpencil_object_cache_add(), blender::draw::gpencil::tObject::is_drawmode3d, blender::draw::gpencil::tObject::layers, and blender::draw::gpencil::tObject::vfx.
Referenced by gpencil_batch_cache_get(), and gpencil_object_cache_add().
| void blender::draw::gpencil::gpencil_object_cache_sort | ( | Instance * | inst | ) |
Definition at line 148 of file gpencil_cache_utils.cc.
References gpencil_object_cache_sort(), and blender::draw::gpencil::Instance::is_sorted.
Referenced by blender::draw::gpencil::Instance::draw(), gpencil_batch_cache_get(), and gpencil_object_cache_sort().
|
static |
Definition at line 108 of file gpencil_draw_data.cc.
References blender::add_v3_fl(), blender::clamp_v3(), and gpencil_shade_color().
Referenced by gpencil_shade_color(), and gpencil_viewport_material_overrides().
|
static |
Definition at line 133 of file gpencil_cache_utils.cc.
References b, and gpencil_tobject_dist_sort().
Referenced by gpencil_tobject_dist_sort(), and merge_lists().
|
static |
Definition at line 87 of file gpencil_draw_data.cc.
References blender::copy_v2_v2(), gpencil_uv_transform_get(), blender::rescale_m4(), blender::rotate_m4(), scale(), blender::translate_m4(), and blender::unit_m4().
Referenced by gpencil_material_pool_create(), and gpencil_uv_transform_get().
|
static |
Definition at line 122 of file gpencil_draw_data.cc.
References blender::Object::color, blender::copy_v3_v3(), blender::copy_v4_fl(), blender::copy_v4_v4(), blender::MaterialGPencilStyle::fill_rgba, blender::MaterialGPencilStyle::fill_style, blender::GP_MATERIAL_FILL_STYLE_GRADIENT, blender::GP_MATERIAL_FILL_STYLE_SOLID, blender::GP_MATERIAL_FILL_STYLE_TEXTURE, blender::GP_MATERIAL_STROKE_STYLE_SOLID, blender::GP_MATERIAL_STROKE_STYLE_TEXTURE, gpencil_shade_color(), gpencil_viewport_material_overrides(), blender::MaterialGPencilStyle::ima, blender::MaterialGPencilStyle::mix_factor, blender::MaterialGPencilStyle::mix_stroke_factor, blender::dna::shallow_copy(), blender::MaterialGPencilStyle::sima, blender::MaterialGPencilStyle::stroke_rgba, blender::MaterialGPencilStyle::stroke_style, blender::V3D_LIGHTING_FLAT, blender::V3D_SHADING_MATERIAL_COLOR, blender::V3D_SHADING_OBJECT_COLOR, blender::V3D_SHADING_RANDOM_COLOR, blender::V3D_SHADING_SINGLE_COLOR, blender::V3D_SHADING_TEXTURE_COLOR, blender::V3D_SHADING_VERTEX_COLOR, and blender::draw::gpencil::Instance::v3d_single_color.
Referenced by gpencil_material_pool_create(), and gpencil_viewport_material_overrides().
| tLayer * blender::draw::gpencil::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 ) |
Definition at line 295 of file gpencil_cache_utils.cc.
References blender::draw::detail::SubPassVector< T, block_size >::append_and_get_index(), blender::draw::gpencil::tLayer::blend_ps, BLI_BITMAP_SET, blender::BLI_bitmap_set_all(), BLI_LINKS_APPEND, blender::BLI_memblock_alloc(), blender::DRW_object_get_data_for_drawing(), blender::Object::dtx, blender::GP_LAYER_MASK_HIDE, blender::GP_LAYER_MASK_INVERT, blender::draw::gpencil::Instance::gp_layer_pool, blender::GP_LAYER_TREE_NODE_DISABLE_MASKS_IN_VIEWLAYER, blender::draw::gpencil::Instance::gp_maskbit_pool, GP_MAX_MASKBITS, grease_pencil_layer_cache_add(), grease_pencil_layer_final_opacity_get(), grease_pencil_layer_final_tint_and_alpha_get(), invert(), blender::draw::gpencil::tLayer::is_onion, blender::draw::gpencil::Instance::is_render, layer, blender::draw::gpencil::tLayer::layer_id, blender::draw::gpencil::tObject::layers, blender::draw::gpencil::tLayer::mask_bits, blender::draw::gpencil::tLayer::mask_invert_bits, blender::Object::mode, blender::ViewLayer::name, node, blender::OB_DRAW_IN_FRONT, blender::OB_MODE_PAINT_GREASE_PENCIL, blender::OB_MODE_VERTEX_PAINT, STREQ, blender::draw::gpencil::Instance::v3d_color_type, blender::V3D_SHADING_VERTEX_COLOR, blender::draw::gpencil::Instance::vertex_paint_opacity, blender::draw::gpencil::Instance::view_layer, and blender::draw::gpencil::Instance::xray_alpha.
Referenced by gpencil_batch_cache_get(), and grease_pencil_layer_cache_add().
| tLayer * blender::draw::gpencil::grease_pencil_layer_cache_get | ( | tObject * | tgp_ob, |
| int | layer_id, | ||
| const bool | skip_onion ) |
Definition at line 281 of file gpencil_cache_utils.cc.
References blender::BLI_assert(), grease_pencil_layer_cache_get(), layer, and blender::draw::gpencil::tObject::layers.
Referenced by gpencil_batch_cache_get(), and grease_pencil_layer_cache_get().
|
static |
Definition at line 194 of file gpencil_cache_utils.cc.
References blender::draw::gpencil::Instance::fade_gp_object_opacity, blender::draw::gpencil::Instance::fade_layer_opacity, grease_pencil_layer_final_opacity_get(), blender::draw::gpencil::Instance::is_render, layer, and blender::draw::gpencil::Instance::obact.
Referenced by grease_pencil_layer_cache_add(), and grease_pencil_layer_final_opacity_get().
|
static |
Definition at line 216 of file gpencil_cache_utils.cc.
References blender::draw::gpencil::Instance::do_onion, and grease_pencil_layer_final_tint_and_alpha_get().
Referenced by grease_pencil_layer_cache_add(), and grease_pencil_layer_final_tint_and_alpha_get().
|
static |
Definition at line 266 of file gpencil_cache_utils.cc.
References grease_pencil_layer_random_color_get(), and layer.
Referenced by grease_pencil_layer_random_color_get().
Definition at line 135 of file gpencil_cache_utils.cc.
References b.
| BLI_INLINE void blender::draw::gpencil::insert_list | ( | struct SortInfo * | si, |
| list_node * | list, | ||
| unsigned int | rank ) |
The 'ranks' array essentially captures the recursion stack of a merge-sort. The merge tree is built in a bottom-up manner. The control loop for updating the 'ranks' array is analogous to incrementing a binary integer, and the O(n) time for counting upto n translates to O(n) merges when inserting rank-0 lists. When we plug in the sizes of the lists involved in those merges, we get the O(n log n) time for the sort.
Inserting higher-ranked lists reduce the height of the merge tree, and also eliminate a lot of redundant comparisons when merging two lists that would've been part of the same run. Adding a rank-i list is analogous to incrementing a binary integer by 2**i in one operation, thus sharing a similar speedup.
When inserting higher-ranked lists, we choose to clear out the lower ranks in the interests of keeping the sort stable, but this makes analysis harder. Note that clearing the lower-ranked lists is O(length(list))-- thus it shouldn't affect the O(n log n) behavior. In other words, inserting one rank-i list is equivalent to inserting 2**i rank-0 lists, thus even if we do i additional merges in the clearing-out (taking at most 2**i time) we are still fine. Pre-condition: 2**(rank+1) <= length(list) < 2**(rank+2) (therefore: length(list) >= 2)
Definition at line 223 of file gpencil_cache_utils.cc.
References blender::GP_ONION_SKINNING_USE_CUSTOM_COLORS, and blender::GP_ONION_SKINNING_USE_FADE.
Definition at line 442 of file gpencil_draw_data.cc.
References ELEM, blender::LA_AREA, blender::LA_LOCAL, blender::LA_SPOT, light_power_get(), M_PI, and blender::eevee::LightData::type.
Referenced by gpencil_light_pool_populate(), and light_power_get().
| BLI_INLINE list_node * blender::draw::gpencil::list_sort_do | ( | list_node * | list, |
| CompareFn | func ) |
Main sort function.
Definition at line 268 of file gpencil_cache_utils.cc.
References blender::BLI_ghashutil_strhash_p_murmur(), blender::BLI_hash_int_01(), blender::hsv_to_rgb_v(), blender::Object::id, blender::IMB_colormanagement_rec709_to_scene_linear(), layer, and blender::ID::name.
|
inline |
Definition at line 153 of file gpencil_cache_utils.cc.
References gpencil_tobject_dist_sort(), and blender::draw::gpencil::Instance::tobjects.
|
static |
Definition at line 33 of file gpencil_render.cc.
References blender::clamp_f(), fabsf, blender::draw::View::far_clip(), blender::draw::View::is_persp(), blender::draw::View::near_clip(), remap_depth(), and blender::draw::View::winmat().
Referenced by remap_depth(), and render_init_buffers().
|
static |
Definition at line 294 of file gpencil_render.cc.
References blender::SceneGpencil::aa_samples, blender::draw::gpencil::Instance::antialiasing_accumulate(), blender::draw::gpencil::Instance::antialiasing_sample_get(), blender::draw::gpencil::Instance::begin_sync(), blender::draw::Manager::begin_sync(), blender::BKE_curvemapping_changed(), blender::BLI_assert(), blender::draw::gpencil::Instance::camera, cdf_from_curvemapping(), cdf_invert(), blender::ceil_to_multiple_u(), blender::RenderData::cfra, blender::clamp_f(), CM_TABLE, blender::DEG_get_evaluated(), blender::draw::gpencil::Instance::draw(), blender::DRW_object_visibility_in_active_context(), blender::DRW_render_object_iter(), blender::DRW_render_set_time(), ELEM, blender::draw::gpencil::Instance::end_sync(), blender::draw::Manager::end_sync(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), floorf, blender::fractf(), blender::RenderData::gauss, blender::Scene::grease_pencil_settings, blender::IndexRange::IndexRange(), blender::draw::gpencil::Instance::init(), blender::ViewLayer::layflag, blender::max_ii(), blender::RenderData::mblur_shutter_curve, blender::RenderData::mode, blender::RenderData::motion_blur_position, blender::RenderData::motion_blur_shutter, blender::SceneGpencil::motion_blur_steps, blender::OB_GREASE_PENCIL, blender::OB_LAMP, blender::OB_VISIBLE_SELF, blender::draw::ObjectRef::object, blender::draw::gpencil::Instance::object_sync(), blender::Scene::r, blender::R_MBLUR, blender::RenderEngine::re, blender::RE_engine_frame_set(), blender::RE_GetCamera(), blender::draw::gpencil::Instance::render_color_tx, render_frame(), render_init_buffers(), render_set_view(), blender::SCE_LAY_MOTION_BLUR, blender::DRWContext::scene, shutter_time_to_scene_time(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::draw::Texture::size(), blender::RenderData::subframe, blender::Object::type, and blender::DRWContext::view_layer.
Referenced by render_frame(), and blender::draw::gpencil::Engine::render_to_image().
|
static |
Definition at line 69 of file gpencil_render.cc.
References blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::draw::View::default_get(), blender::draw::Framebuffer::ensure(), blender::draw::Texture::ensure_2d(), blender::ImBuf::float_data_for_write(), GPU_ATTACHMENT_TEXTURE, blender::GPU_DATA_FLOAT, blender::GPU_framebuffer_bind(), blender::GPU_framebuffer_clear_color(), blender::GPU_framebuffer_clear_depth(), blender::GPU_texture_update(), blender::GPU_texture_update_sub(), blender::GPU_TEXTURE_USAGE_ATTACHMENT, blender::GPU_TEXTURE_USAGE_HOST_READ, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::RenderPass::ibuf, blender::draw::Texture::is_valid(), blender::RenderEngine::re, blender::RE_engine_set_error_message(), blender::RE_GetActiveRenderView(), blender::RE_pass_find_by_name(), RE_PASSNAME_COMBINED, RE_PASSNAME_DEPTH, blender::RenderPass::rectx, blender::RenderPass::recty, remap_depth(), blender::draw::gpencil::Instance::render_color_tx, blender::draw::gpencil::Instance::render_depth_tx, blender::draw::gpencil::Instance::render_fb, render_init_buffers(), blender::DRWContext::viewport_size_get(), w(), blender::x, blender::rcti::xmax, blender::rcti::xmin, y, blender::rcti::ymax, and blender::rcti::ymin.
Referenced by render_frame(), render_init_buffers(), and blender::draw::gpencil::Engine::render_to_image().
|
static |
Definition at line 217 of file gpencil_render.cc.
References blender::draw::gpencil::Instance::accumulation_tx, blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::draw::Framebuffer::ensure(), blender::ImBuf::float_data_for_write(), GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE, blender::GPU_DATA_FLOAT, blender::GPU_framebuffer_bind(), blender::GPU_framebuffer_read_color(), blender::IMB_partial_update_mark_full(), render_result_color(), blender::rcti::xmin, and blender::rcti::ymin.
Referenced by render_result_color(), and blender::draw::gpencil::Engine::render_to_image().
|
static |
Definition at line 157 of file gpencil_render.cc.
References blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::draw::View::default_get(), fabsf, blender::draw::View::far_clip(), blender::ImBuf::float_data_for_write(), blender::GPU_DATA_FLOAT, blender::GPU_framebuffer_read_depth(), blender::RenderPass::ibuf, blender::IMB_partial_update_mark_full(), blender::draw::View::near_clip(), blender::ViewLayer::passflag, blender::RE_pass_find_by_name(), RE_PASSNAME_DEPTH, blender::draw::gpencil::Instance::render_fb, render_result_z(), blender::SCE_PASS_DEPTH, blender::DRWContext::view_layer, blender::draw::View::winmat(), blender::rcti::xmin, and blender::rcti::ymin.
Referenced by render_result_z(), and blender::draw::gpencil::Engine::render_to_image().
|
static |
Definition at line 54 of file gpencil_render.cc.
References render_set_view().
Referenced by render_frame(), render_set_view(), and blender::draw::gpencil::Engine::render_to_image().
|
static |
Definition at line 270 of file gpencil_render.cc.
References BLI_assert_msg, blender::SCE_MB_CENTER, blender::SCE_MB_END, blender::SCE_MB_START, and shutter_time_to_scene_time().
Referenced by render_frame(), and shutter_time_to_scene_time().
| BLI_INLINE list_node * blender::draw::gpencil::sweep_up | ( | struct SortInfo * | si, |
| list_node * | list, | ||
| unsigned int | upto ) |
Pre-condition: upto <= si->n_ranks, list == NULL || length(list) == 1
Definition at line 184 of file gpencil_cache_utils.cc.
Definition at line 94 of file gpencil_cache_utils.cc.