|
Blender V4.3
|
Contains procedural GPU hair drawing methods. More...
#include "DRW_render.hh"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "DNA_collection_types.h"#include "DNA_customdata_types.h"#include "DNA_modifier_types.h"#include "DNA_particle_types.h"#include "BKE_duplilist.hh"#include "GPU_batch.hh"#include "GPU_capabilities.hh"#include "GPU_compute.hh"#include "GPU_context.hh"#include "GPU_material.hh"#include "GPU_shader.hh"#include "GPU_texture.hh"#include "GPU_vertex_buffer.hh"#include "DRW_gpu_wrapper.hh"#include "draw_hair_private.hh"#include "draw_shader.hh"#include "draw_shader_shared.hh"#include "draw_common.hh"Go to the source code of this file.
Classes | |
| struct | ParticleRefineCall |
Namespaces | |
| namespace | blender |
| namespace | blender::draw |
Variables | |
| static blender::gpu::VertBuf * | g_dummy_vbo = nullptr |
| static DRWPass * | g_tf_pass |
| static blender::draw::UniformBuffer< CurvesInfos > * | g_dummy_curves_info = nullptr |
| static PassSimple * | blender::draw::g_pass = nullptr |
Contains procedural GPU hair drawing methods.
Definition in file draw_hair.cc.
| void DRW_hair_duplimat_get | ( | Object * | object, |
| ParticleSystem * | psys, | ||
| ModifierData * | md, | ||
| float(*) | dupli_mat[4] ) |
Definition at line 146 of file draw_hair.cc.
References copy_m4_m4(), DRW_object_get_dupli(), DRW_object_get_dupli_parent(), Object::instance_collection, invert_m4(), mul_m4_m4m4(), DupliObject::ob, OB_DUPLICOLLECTION, sub_v3_v3(), DupliObject::type, and unit_m4().
Referenced by DRW_shgroup_hair_create_sub(), and blender::draw::hair_sub_pass_setup_implementation().
|
static |
Definition at line 49 of file draw_hair.cc.
References g_dummy_curves_info, g_dummy_vbo, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), and GPU_vertformat_attr_add().
Referenced by DRW_hair_init().
| void DRW_hair_free | ( | ) |
Definition at line 259 of file draw_hair.cc.
References g_dummy_curves_info, g_dummy_vbo, and GPU_VERTBUF_DISCARD_SAFE.
Referenced by blender::draw::DRW_curves_free().
| void DRW_hair_init | ( | ) |
Definition at line 73 of file draw_hair.cc.
References drw_hair_ensure_vbo(), DRW_pass_create(), DRW_STATE_NO_DRAW, and g_tf_pass.
Referenced by blender::draw::DRW_curves_init().
|
static |
Definition at line 112 of file draw_hair.cc.
References drw_hair_particle_cache_update_compute(), and update().
Referenced by DRW_hair_pos_buffer_get(), DRW_shgroup_hair_create_sub(), and blender::draw::hair_sub_pass_setup_implementation().
|
static |
Definition at line 80 of file draw_hair.cc.
References DRW_shgroup_buffer_texture(), DRW_shgroup_uniform_int(), ParticleHairCache::final, ParticleHairCache::proc_point_buf, ParticleHairCache::proc_strand_buf, ParticleHairCache::proc_strand_seg_buf, and ParticleHairFinalCache::strands_res.
Referenced by drw_hair_particle_cache_update_compute().
|
static |
Definition at line 90 of file draw_hair.cc.
References drw_hair_particle_cache_shgrp_attach_resources(), DRW_shader_hair_refine_get(), DRW_shgroup_call_compute(), DRW_shgroup_create(), DRW_shgroup_create_sub(), DRW_shgroup_uniform_int_copy(), DRW_shgroup_vertex_buffer, ParticleHairCache::final, g_tf_pass, GPU_max_work_group_count(), PART_REFINE_CATMULL_ROM, ParticleHairFinalCache::proc_buf, ParticleHairCache::strands_len, and ParticleHairFinalCache::strands_res.
Referenced by drw_hair_particle_cache_get().
| blender::gpu::VertBuf * DRW_hair_pos_buffer_get | ( | Object * | object, |
| ParticleSystem * | psys, | ||
| ModifierData * | md ) |
Definition at line 130 of file draw_hair.cc.
References DRW_context_state_get(), drw_hair_particle_cache_get(), ParticleHairCache::final, RenderData::hair_subdiv, ParticleHairFinalCache::proc_buf, Scene::r, SCE_HAIR_SHAPE_STRAND, and DRWContextState::scene.
Referenced by blender::eevee::VelocityModule::step_object_sync().
| void DRW_hair_update | ( | ) |
Definition at line 252 of file draw_hair.cc.
References DRW_draw_pass(), g_tf_pass, GPU_BARRIER_SHADER_STORAGE, and GPU_memory_barrier().
Referenced by blender::draw::DRW_curves_update().
| DRWShadingGroup * DRW_shgroup_hair_create_sub | ( | Object * | object, |
| ParticleSystem * | psys, | ||
| ModifierData * | md, | ||
| DRWShadingGroup * | shgrp, | ||
| GPUMaterial * | gpu_material ) |
This creates a shading group with display hairs. The draw call is already added by this function, just add additional uniforms.
Definition at line 174 of file draw_hair.cc.
References ParticleHairCache::col_layer_names, ParticleHairCache::col_tex, DRW_context_state_get(), DRW_hair_duplimat_get(), drw_hair_particle_cache_get(), DRW_shgroup_add_material_resources(), DRW_shgroup_buffer_texture(), DRW_shgroup_call_no_cull, DRW_shgroup_create_sub(), DRW_shgroup_uniform_block, DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_int(), DRW_shgroup_uniform_int_copy(), DRW_shgroup_uniform_mat4_copy(), DRW_shgroup_uniform_texture(), ParticleHairCache::final, g_dummy_curves_info, g_dummy_vbo, RenderData::hair_subdiv, MAX_LAYER_NAME_CT, ParticleHairCache::num_col_layers, ParticleHairCache::num_uv_layers, ParticleSystem::part, PART_SHAPE_CLOSE_TIP, ParticleHairFinalCache::proc_buf, ParticleHairFinalCache::proc_hairs, ParticleHairCache::proc_length_buf, Scene::r, SCE_HAIR_SHAPE_STRAND, DRWContextState::scene, ParticleSettings::shape, ParticleHairFinalCache::strands_res, ParticleHairCache::uv_layer_names, and ParticleHairCache::uv_tex.
|
static |
Definition at line 47 of file draw_hair.cc.
Referenced by drw_hair_ensure_vbo(), DRW_hair_free(), DRW_shgroup_hair_create_sub(), and blender::draw::hair_sub_pass_setup_implementation().
|
static |
Definition at line 45 of file draw_hair.cc.
Referenced by drw_hair_ensure_vbo(), DRW_hair_free(), and DRW_shgroup_hair_create_sub().
|
static |
Definition at line 46 of file draw_hair.cc.
Referenced by DRW_hair_init(), drw_hair_particle_cache_update_compute(), and DRW_hair_update().