|
Blender V5.0
|
#include <workbench_private.hh>
Public Member Functions | |
| AntiAliasingPass () | |
| void | init (const SceneState &scene_state) |
| void | sync (const SceneState &scene_state, SceneResources &resources) |
| void | setup_view (View &view, const SceneState &scene_state) |
| void | draw (const DRWContext *draw_ctx, Manager &manager, View &view, const SceneState &scene_state, SceneResources &resources, gpu::Texture *depth_in_front_tx) |
Definition at line 556 of file workbench_private.hh.
| blender::workbench::AntiAliasingPass::AntiAliasingPass | ( | ) |
Definition at line 113 of file workbench_effect_antialiasing.cc.
References AREATEX_HEIGHT, AREATEX_WIDTH, areaTexBytes, GPU_DATA_UBYTE, GPU_texture_filter_mode(), GPU_texture_update(), GPU_TEXTURE_USAGE_SHADER_READ, SEARCHTEX_HEIGHT, SEARCHTEX_WIDTH, and searchTexBytes.
| void blender::workbench::AntiAliasingPass::draw | ( | const DRWContext * | draw_ctx, |
| Manager & | manager, | ||
| View & | view, | ||
| const SceneState & | scene_state, | ||
| SceneResources & | resources, | ||
| gpu::Texture * | depth_in_front_tx ) |
We always do SMAA on top of TAA accumulation, unless the number of samples of TAA is already high. This ensure a smoother transition. If TAA accumulation is finished, we only blit the result.
Always acquire to avoid constant allocation/deallocation.
| depth_in_front_tx | Passed directly since we may need to copy back the results from the first sample, and resources.depth_in_front_tx is only valid when mesh passes have to draw to it. |
Definition at line 242 of file workbench_effect_antialiasing.cc.
References blender::workbench::SceneResources::color_tx, blender::workbench::SceneResources::depth_in_front_tx, blender::workbench::SceneResources::depth_tx, GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE, GPU_texture_copy(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, DRWContext::is_image_render(), DRWContext::is_scene_render(), blender::draw::Texture::is_valid(), blender::workbench::SceneState::resolution, blender::workbench::SceneState::sample, blender::workbench::SceneState::samples_len, blender::draw::Manager::submit(), and view.
| void blender::workbench::AntiAliasingPass::init | ( | const SceneState & | scene_state | ) |
Definition at line 128 of file workbench_effect_antialiasing.cc.
References blender::workbench::SceneState::draw_aa.
| void blender::workbench::AntiAliasingPass::setup_view | ( | View & | view, |
| const SceneState & | scene_state ) |
Definition at line 198 of file workbench_effect_antialiasing.cc.
References blender::draw::View::default_get(), blender::workbench::get_taa_samples(), blender::draw::View::persmat(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::workbench::SceneState::resolution, blender::workbench::SceneState::sample, blender::workbench::SceneState::samples_len, blender::workbench::setup_taa_weights(), view, blender::draw::View::viewmat(), window_translate_m4(), blender::draw::View::winmat(), blender::workbench::TaaSamples::x11, blender::workbench::TaaSamples::x16, blender::workbench::TaaSamples::x32, blender::workbench::TaaSamples::x5, and blender::workbench::TaaSamples::x8.
| void blender::workbench::AntiAliasingPass::sync | ( | const SceneState & | scene_state, |
| SceneResources & | resources ) |
Definition at line 133 of file workbench_effect_antialiasing.cc.
References clamp_f(), blender::workbench::SceneResources::color_tx, DRW_STATE_BLEND_ADD_FULL, DRW_STATE_DEPTH_ALWAYS, DRW_STATE_STENCIL_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::workbench::ShaderCache::get(), GPU_PRIM_TRIS, GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, blender::workbench::OBJECT_IN_FRONT, blender::workbench::SceneState::resolution, and blender::workbench::SceneState::sample.