MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / buildWeightedBlended

Function buildWeightedBlended

test/TestRenderGraph.cpp:1135–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1133}
1134
1135crg::Attachment const * buildWeightedBlended( test::TestCounts & testCounts
1136 , crg::Attachment const *& dta
1137 , crg::Attachment const * lda
1138 , crg::ImageViewId const & dtv
1139 , crg::FrameGraph & graph )
1140{
1141 auto a = graph.createImage( test::createImage( "a", crg::PixelFormat::eR16G16B16A16_SFLOAT ) );
1142 auto av = graph.createView( test::createView( "av", a, crg::PixelFormat::eR16G16B16A16_SFLOAT ) );
1143 auto r = graph.createImage( test::createImage( "r", crg::PixelFormat::eR16_SFLOAT ) );
1144 auto rv = graph.createView( test::createView( "rv", r, crg::PixelFormat::eR16_SFLOAT ) );
1145 auto & accumulationPass = graph.createPass( "accumulationPass"
1146 , [&testCounts]( crg::FramePass const & framePass
1147 , crg::GraphContext & context
1148 , crg::RunnableGraph & runGraph )
1149 {
1150 return createDummy( testCounts
1151 , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader );
1152 } );
1153 auto aa = accumulationPass.addOutputColourTarget( av );
1154 auto ra = accumulationPass.addOutputColourTarget( rv );
1155 if ( dta )
1156 accumulationPass.addInputDepthStencilTarget( *dta );
1157 else
1158 dta = accumulationPass.addOutputDepthStencilTarget( dtv );
1159
1160 auto c = graph.createImage( test::createImage( "c", crg::PixelFormat::eR32G32B32_SFLOAT ) );
1161 auto cv = graph.createView( test::createView( "cv", c, crg::PixelFormat::eR32G32B32_SFLOAT ) );
1162 auto & combinePass = graph.createPass( "combinePass"
1163 , [&testCounts]( crg::FramePass const & framePass
1164 , crg::GraphContext & context
1165 , crg::RunnableGraph & runGraph )
1166 {
1167 return createDummy( testCounts
1168 , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader );
1169 } );
1170 if ( lda )
1171 combinePass.addInputSampled( *lda, 0u );
1172 combinePass.addInputSampled( *aa, 1u );
1173 combinePass.addInputSampled( *ra, 2u );
1174 return combinePass.addOutputColourTarget( cv );
1175}
1176
1177template< bool EnableDepthPrepass
1178 , bool EnableOpaque

Callers 1

TYPED_TESTFunction · 0.85

Calls 9

createImageFunction · 0.85
createViewFunction · 0.85
createDummyFunction · 0.85
addOutputColourTargetMethod · 0.80
addInputSampledMethod · 0.80
createImageMethod · 0.45
createViewMethod · 0.45

Tested by

no test coverage detected