Blender V4.5
blender::workbench::SceneResources Struct Reference

#include <workbench_private.hh>

Public Member Functions

 ~SceneResources ()
 
void init (const SceneState &scene_state, const DRWContext *ctx)
 
void load_jitter_tx (int total_samples)
 

Public Attributes

StringRefNull current_matcap = {}
 
Texture matcap_tx = "matcap_tx"
 
TextureFromPool object_id_tx = "wb_object_id_tx"
 
TextureRef color_tx
 
TextureRef depth_tx
 
TextureRef depth_in_front_tx
 
Framebuffer clear_fb = {"Clear Main"}
 
Framebuffer clear_depth_only_fb = {"Clear Depth"}
 
Framebuffer clear_in_front_fb = {"Clear In Front"}
 
StorageVectorBuffer< Materialmaterial_buf = {"material_buf"}
 
UniformBuffer< WorldDataworld_buf = {}
 
UniformArrayBuffer< float4, 6 > clip_planes_buf
 
Texture jitter_tx = "wb_jitter_tx"
 
CavityEffect cavity = {}
 
Texture missing_tx = "missing_tx"
 
MaterialTexture missing_texture
 
Texture dummy_texture_tx = {"dummy_texture"}
 
Texture dummy_tile_data_tx = {"dummy_tile_data"}
 
Texture dummy_tile_array_tx = {"dummy_tile_array"}
 
gpu::Batch * volume_cube_batch = nullptr
 

Static Public Attributes

static const int jitter_tx_size = 64
 

Detailed Description

Definition at line 215 of file workbench_private.hh.

Constructor & Destructor Documentation

◆ ~SceneResources()

blender::workbench::SceneResources::~SceneResources ( )
inline

Definition at line 248 of file workbench_private.hh.

References GPU_BATCH_DISCARD_SAFE, and volume_cube_batch.

Member Function Documentation

◆ init()

void blender::workbench::SceneResources::init ( const SceneState & scene_state,
const DRWContext * ctx )

Definition at line 108 of file workbench_resources.cc.

References WorldData::ambient_color, blender::workbench::SceneState::background_color, WorldData::background_color, BKE_studiolight_find(), BKE_studiolight_studio_edit_get(), cavity, blender::workbench::SceneState::clip_planes, clip_planes_buf, current_matcap, blender::workbench::SceneState::draw_dof, dummy_texture_tx, dummy_tile_array_tx, dummy_tile_data_tx, blender::draw::Texture::ensure_1d_array(), blender::draw::Texture::ensure_2d(), blender::draw::Texture::ensure_2d_array(), StudioLight::flag, View3DShading::flag, blender::workbench::get_light_data_from_studio_solidlight(), blender::workbench::get_matcap_tx(), blender::workbench::get_world_shading_rotation_matrix(), blender::workbench::MaterialTexture::gpu, GPU_batch_unit_cube(), GPU_RGBA16F, GPU_RGBA8, GPU_TEXTURE_USAGE_SHADER_READ, blender::MatBase< float, 4, 4 >::identity(), blender::workbench::CavityEffect::init(), DRWContext::is_image_render(), blender::draw::Texture::is_valid(), jitter_tx, StudioLight::light, View3DShading::light, StudioLight::light_ambient, WorldData::lights, load_jitter_tx(), View3DShading::matcap, WorldData::matcap_orientation, matcap_tx, missing_texture, missing_tx, blender::workbench::MaterialTexture::name, StudioLight::name, View3DShading::object_outline_color, WorldData::object_outline_color, blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), blender::workbench::SceneState::shading, View3DShading::studio_light, View3DShading::studiolight_rot_z, STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS, STUDIOLIGHT_TYPE_MATCAP, STUDIOLIGHT_TYPE_STUDIO, ImageGPUTextures::texture, WorldData::ui_scale, WorldData::use_specular, V3D_LIGHTING_MATCAP, V3D_SHADING_MATCAP_FLIP_X, V3D_SHADING_SPECULAR_HIGHLIGHT, V3D_SHADING_WORLD_ORIENTATION, WorldData::viewport_size, DRWContext::viewport_size_get(), WorldData::viewport_size_inv, volume_cube_batch, world_buf, View3DShading::xray_alpha, and WorldData::xray_alpha.

Referenced by blender::workbench::Instance::draw_image_render(), and blender::workbench::Instance::init().

◆ load_jitter_tx()

Member Data Documentation

◆ cavity

CavityEffect blender::workbench::SceneResources::cavity = {}

Definition at line 237 of file workbench_private.hh.

Referenced by init(), and blender::workbench::OpaquePass::sync().

◆ clear_depth_only_fb

Framebuffer blender::workbench::SceneResources::clear_depth_only_fb = {"Clear Depth"}

Definition at line 228 of file workbench_private.hh.

◆ clear_fb

Framebuffer blender::workbench::SceneResources::clear_fb = {"Clear Main"}

Definition at line 227 of file workbench_private.hh.

Referenced by blender::workbench::Instance::draw().

◆ clear_in_front_fb

Framebuffer blender::workbench::SceneResources::clear_in_front_fb = {"Clear In Front"}

Definition at line 229 of file workbench_private.hh.

Referenced by blender::workbench::Instance::draw().

◆ clip_planes_buf

UniformArrayBuffer<float4, 6> blender::workbench::SceneResources::clip_planes_buf

Definition at line 233 of file workbench_private.hh.

Referenced by init(), and blender::workbench::MeshPass::init_pass().

◆ color_tx

◆ current_matcap

StringRefNull blender::workbench::SceneResources::current_matcap = {}

Definition at line 218 of file workbench_private.hh.

Referenced by init().

◆ depth_in_front_tx

◆ depth_tx

◆ dummy_texture_tx

Texture blender::workbench::SceneResources::dummy_texture_tx = {"dummy_texture"}

Definition at line 242 of file workbench_private.hh.

Referenced by init(), and blender::workbench::MeshPass::init_pass().

◆ dummy_tile_array_tx

Texture blender::workbench::SceneResources::dummy_tile_array_tx = {"dummy_tile_array"}

Definition at line 244 of file workbench_private.hh.

Referenced by init(), and blender::workbench::MeshPass::init_pass().

◆ dummy_tile_data_tx

Texture blender::workbench::SceneResources::dummy_tile_data_tx = {"dummy_tile_data"}

Definition at line 243 of file workbench_private.hh.

Referenced by init(), and blender::workbench::MeshPass::init_pass().

◆ jitter_tx

Texture blender::workbench::SceneResources::jitter_tx = "wb_jitter_tx"

◆ jitter_tx_size

const int blender::workbench::SceneResources::jitter_tx_size = 64
static

Definition at line 216 of file workbench_private.hh.

Referenced by load_jitter_tx().

◆ matcap_tx

Texture blender::workbench::SceneResources::matcap_tx = "matcap_tx"

◆ material_buf

◆ missing_texture

MaterialTexture blender::workbench::SceneResources::missing_texture

◆ missing_tx

Texture blender::workbench::SceneResources::missing_tx = "missing_tx"

Definition at line 239 of file workbench_private.hh.

Referenced by init().

◆ object_id_tx

◆ volume_cube_batch

gpu::Batch* blender::workbench::SceneResources::volume_cube_batch = nullptr

Definition at line 246 of file workbench_private.hh.

Referenced by init(), and ~SceneResources().

◆ world_buf


The documentation for this struct was generated from the following files: