Skip to content

Commit

Permalink
OutputBuffer : Use renderer default filter for beauty
Browse files Browse the repository at this point in the history
This means no change for Cycles, an upgrade to `gaussian` for Arnold and an upgrade to `blackman-harris` for 3Delight. The latter is particularly important as 3Delight's box filter seems to be excessively soft.
  • Loading branch information
johnhaddon committed May 29, 2024
1 parent 658f03c commit dd82434
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/GafferSceneUI/OutputBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ OutputBuffer::OutputBuffer( IECoreScenePreview::Renderer *renderer )
using OutputDefinition = std::tuple<const char *, const char *, const char *>;
for(
auto &[name, data, filter] : {
OutputDefinition( "beauty", "rgba", "box" ),
/// \todo Define standard filter names that can be supported across
/// all renderer backends, and settle on one for the beauty.
OutputDefinition( "beauty", "rgba", nullptr ),
// Using `box` rather than `closest` for Z because it gives a better
// approximation of depth at the centre of the pixel, which is important
// for accuracy in `SceneGadget::objectAt()`.
OutputDefinition( "depth", "float Z", "box" ),
OutputDefinition( "id", "uint id", "closest" ),
}
Expand All @@ -209,7 +214,10 @@ OutputBuffer::OutputBuffer( IECoreScenePreview::Renderer *renderer )
IECoreScene::OutputPtr output = outputTemplate->copy();
output->setName( name );
output->setData( data );
output->parameters()["filter"] = new IECore::StringData( filter );
if( filter )
{
output->parameters()["filter"] = new IECore::StringData( filter );
}
renderer->output( string( "__outputBuffer:" ) + name, output.get() );
}
}
Expand Down

0 comments on commit dd82434

Please sign in to comment.