Export: a Render Queue job renders every frame on the project's renderer (#414)
Cause: pipeline::Cx rendered with Backend::Auto, which picks the CPU or the GPU compositor for each top-level frame from measured frame times (render::AutoPick: warm-up on both sides, a re-probe every 48 frames). The two compositors differ slightly, so frames came out differently depending on which side the timings favoured in that run, and two GPU exports of the same frames differed. Fix: the job renders every frame on the project's renderer, as After Effects renders a job with one renderer: Backend::Gpu with Mercury GPU Acceleration (frames the GPU declines still render on the CPU, as they do in every GPU render), Backend::Cpu with Mercury Software Only. The viewer and previews keep Auto. Docs (architecture, parity, web) say so. Tests: render_settings::a_job_renders_on_one_compositor exports ten frames with a stand-in GPU compositor that keeps Auto history and draws solid green: with Mercury GPU Acceleration every frame is green and two runs are identical (with Auto the warm-up sent frames to the CPU: it fails), with Software Only the stand-in is never asked. The web worker GPU job test's comment no longer describes Auto. Diagnosis by @pat-the-wizard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1ccf7cb910
commit
8c4a3cbfe0
@@ -75,7 +75,8 @@ pub struct Job<'a> {
|
||||
pub project: &'a Project,
|
||||
pub footage: &'a dyn FootageSource,
|
||||
pub expr: Option<&'a dyn ExprHost>,
|
||||
/// GPU compositor: used when the project's renderer is Mercury GPU Acceleration.
|
||||
/// GPU compositor: used for every frame of the job when the project's renderer is Mercury
|
||||
/// GPU Acceleration (frames it declines render on the CPU).
|
||||
pub accel: Option<&'a dyn effectcraft_render::Accelerator>,
|
||||
pub comp: ItemId,
|
||||
pub settings: &'a RenderSettings,
|
||||
|
||||
@@ -9,7 +9,7 @@ use effectcraft_project::render_queue::{
|
||||
};
|
||||
use effectcraft_project::{Comp, Project};
|
||||
use effectcraft_raster::Image;
|
||||
use effectcraft_render::{LayerCache, RenderOpts, Renderer};
|
||||
use effectcraft_render::{Backend, LayerCache, RenderOpts, Renderer};
|
||||
use effectcraft_time::Tick;
|
||||
use web_time::Instant;
|
||||
|
||||
@@ -87,6 +87,10 @@ impl<'a> Cx<'a> {
|
||||
/// and layer cache.
|
||||
fn renderer(&self) -> Renderer<'_> {
|
||||
let s = self.job.settings;
|
||||
// The whole job renders on the project's renderer (Mercury GPU Acceleration or Software
|
||||
// Only), not on whichever compositor Auto timed faster for each frame: the CPU and GPU
|
||||
// compositors differ slightly, so a per-frame choice made renders differ run to run.
|
||||
let backend = if self.project.settings.gpu_acceleration { Backend::Gpu } else { Backend::Cpu };
|
||||
let opts = RenderOpts {
|
||||
scale: s.resolution.clamp(0.01, 4.0),
|
||||
motion_blur: s.motion_blur_override() != SwitchOverride::OffForAll,
|
||||
@@ -94,7 +98,7 @@ impl<'a> Cx<'a> {
|
||||
draft: s.quality == RenderQuality::Draft,
|
||||
// Output renders always look through the comp's active camera.
|
||||
view: None,
|
||||
backend: effectcraft_render::Backend::Auto,
|
||||
backend,
|
||||
roi: None,
|
||||
nested_switches: self.job.nested_switches,
|
||||
draft_shadows: true,
|
||||
|
||||
Reference in New Issue
Block a user