Fix: Workbench: Static Viewport Animation Render
Fix viewport animation renders where there has been no scene updates between frames.
This commit is contained in:
@@ -301,7 +301,7 @@ void AntiAliasingPass::draw(const DRWContext *draw_ctx,
|
||||
GPU_RG8,
|
||||
GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT);
|
||||
|
||||
if (!draw_ctx->is_image_render() || last_sample) {
|
||||
if (!draw_ctx->is_image_render() || taa_finished) {
|
||||
/* After a certain point SMAA is no longer necessary. */
|
||||
if (smaa_mix_factor_ > 0.0f) {
|
||||
smaa_edge_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(smaa_edge_tx_));
|
||||
|
||||
@@ -528,6 +528,13 @@ class Instance : public DrawEngine {
|
||||
GPUTexture *color_tx,
|
||||
RenderEngine *engine = nullptr)
|
||||
{
|
||||
if (scene_state_.render_finished) {
|
||||
/* This can happen in viewport animation renders, if the scene didn't have any updates
|
||||
* between frames. */
|
||||
this->draw(manager, depth_tx, depth_in_front_tx, color_tx);
|
||||
return;
|
||||
}
|
||||
|
||||
BLI_assert(scene_state_.sample == 0);
|
||||
for (auto i : IndexRange(scene_state_.samples_len)) {
|
||||
if (engine && RE_engine_test_break(engine)) {
|
||||
|
||||
Reference in New Issue
Block a user