| 1133 | } |
| 1134 | |
| 1135 | crg::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 | |
| 1177 | template< bool EnableDepthPrepass |
| 1178 | , bool EnableOpaque |
no test coverage detected