193void QSSGCustomMaterialSystem::rhiPrepareRenderable(QSSGRhiGraphicsPipelineState *ps,
195 QSSGSubsetRenderable &renderable,
196 const QSSGShaderFeatures &featureSet,
197 const QSSGRenderCustomMaterial &material,
198 const QSSGLayerRenderData &layerData,
199 QRhiRenderPassDescriptor *renderPassDescriptor,
203 QSSGRenderCamera *alteredCamera,
204 QSSGRenderTextureCubeFace cubeFace,
205 QMatrix4x4 *alteredModelViewProjection,
206 QSSGReflectionMapEntry *entry,
209 QSSGRhiContext *rhiCtx = context->rhiContext().get();
211 QRhiGraphicsPipeline::TargetBlend blend;
212 if (material.m_renderFlags.testFlag(QSSGRenderCustomMaterial::RenderFlag::Blending)) {
214 blend.srcColor = material.m_srcBlend;
215 blend.srcAlpha = material.m_srcAlphaBlend;
216 blend.dstColor = material.m_dstBlend;
217 blend.dstAlpha = material.m_dstAlphaBlend;
220 const QSSGCullFaceMode cullMode = material.m_cullMode;
222 const auto &defaultMaterialShaderKeyProperties = layerData.getDefaultMaterialPropertyTable();
224 const bool blendParticles = defaultMaterialShaderKeyProperties.m_blendParticles.getValue(renderable.shaderDescription);
226 const auto &shaderPipeline = shadersForCustomMaterial(ps, material, renderable, defaultMaterialShaderKeyProperties, featureSet);
228 if (shaderPipeline) {
229 QSSGRhiShaderResourceBindingList bindings;
230 const auto &modelNode = renderable.modelContext.model;
240 const auto cubeFaceIdx = QSSGBaseTypeHelpers::indexOfCubeFace(cubeFace);
241 const quintptr entryIdx = quintptr(cubeFace != QSSGRenderTextureCubeFaceNone)
242 * (cubeFaceIdx + (quintptr(renderable.subset.offset) << 3));
246 const auto *materialResource =
static_cast<
const QSSGRenderGraphObject *>(&material);
247 QSSGRhiDrawCallData &dcd = QSSGRhiContextPrivate::get(rhiCtx)->drawCallData({ passKey, &modelNode,
248 materialResource, entry,
251 shaderPipeline->ensureCombinedUniformBuffer(&dcd.ubuf);
252 char *ubufData = dcd.ubuf->beginFullDynamicBufferUpdateForCurrentFrame();
253 if (!alteredCamera) {
254 updateUniformsForCustomMaterial(*shaderPipeline, rhiCtx, layerData, ubufData, ps, material, renderable, layerData.renderedCameras,
nullptr,
nullptr);
256 QSSGRenderCameraList cameras({ alteredCamera });
257 updateUniformsForCustomMaterial(*shaderPipeline, rhiCtx, layerData, ubufData, ps, material, renderable, cameras,
nullptr, alteredModelViewProjection);
260 QSSGParticleRenderer::updateUniformsForParticleModel(*shaderPipeline, ubufData, &renderable.modelContext.model, renderable.subset.offset);
261 dcd.ubuf->endFullDynamicBufferUpdateForCurrentFrame();
264 QSSGParticleRenderer::prepareParticlesForModel(*shaderPipeline, rhiCtx, bindings, &renderable.modelContext.model);
265 bool instancing =
false;
268 if (!alteredCamera) {
269 const QSSGRenderCameraDataList &cameraDatas(*layerData.renderedCameraData);
270 instancing = QSSGLayerRenderData::prepareInstancing(rhiCtx, &renderable, cameraDatas[0].direction, cameraDatas[0].position,
271 renderable.instancingLodMin, renderable.instancingLodMax, layerData);
272 if (instancing && renderable.usesAutoLod)
273 QSSGLayerRenderData::prepareAutoLodInstancing(rhiCtx, &renderable, layerData);
276 const auto &altCamTransform = layerData.getGlobalTransform(*alteredCamera);
277 instancing = QSSGLayerRenderData::prepareInstancing(rhiCtx, &renderable, QSSGRenderNode::getScalingCorrectDirection(altCamTransform), QSSGRenderNode::getGlobalPos(altCamTransform),
278 renderable.instancingLodMin, renderable.instancingLodMax, layerData);
281 ps->samples = samples;
282 ps->viewCount = viewCount;
284 ps->cullMode = QSSGRhiHelpers::toCullMode(cullMode);
287 ps->targetBlend[0] = blend;
289 auto &ia = QSSGRhiInputAssemblerStatePrivate::get(*ps);
291 ia = renderable.subset.rhi.ia;
296 int instanceBufferBinding = -1;
299 const quint32 stride = renderable.modelContext.model.instanceTable->stride();
300 QVarLengthArray<QRhiVertexInputBinding, 8> bindings;
301 std::copy(ia.inputLayout.cbeginBindings(),
302 ia.inputLayout.cendBindings(),
303 std::back_inserter(bindings));
304 bindings.append({ stride, QRhiVertexInputBinding::PerInstance });
305 instanceBufferBinding = bindings.size() - 1;
306 const bool usesInstanceIndex = shaderPipeline->instanceBufferLocations().index >= 0;
307 if (usesInstanceIndex)
308 bindings.append({ quint32(
sizeof(qint32)), QRhiVertexInputBinding::PerInstance });
309 ia.inputLayout.setBindings(bindings.cbegin(), bindings.cend());
312 QSSGRhiHelpers::bakeVertexInputLocations(&ia, *shaderPipeline, instanceBufferBinding);
314 QRhiResourceUpdateBatch *resourceUpdates = rhiCtx->rhi()->nextResourceUpdateBatch();
315 QRhiTexture *dummyTexture = rhiCtx->dummyTexture({}, resourceUpdates);
316 QRhiTexture *dummyTextureArray = rhiCtx->dummyTexture({}, resourceUpdates, QSize(64, 64), Qt::black, qMax(2, viewCount));
317 QRhiTexture *dummyTexture3D = rhiCtx->dummyTexture(QRhiTexture::ThreeDimensional, resourceUpdates);
318 QRhiTexture *dummyCubeTexture = rhiCtx->dummyTexture(QRhiTexture::CubeMap, resourceUpdates);
319 QRhiTexture *dummyCubeTextureArray = rhiCtx->dummyTexture(QRhiTexture::CubeMap, resourceUpdates, QSize(64, 64), Qt::black, qMax(2, viewCount));
321 rhiCtx->commandBuffer()->resourceUpdate(resourceUpdates);
323 bindings.addUniformBuffer(0, CUSTOM_MATERIAL_VISIBILITY_ALL, dcd.ubuf, 0, shaderPipeline->ub0Size());
324 bindings.addUniformBuffer(1, CUSTOM_MATERIAL_VISIBILITY_ALL, dcd.ubuf, shaderPipeline->ub0LightDataOffset(),
sizeof(QSSGShaderLightsUniformData));
325 bindings.addUniformBuffer(2, CUSTOM_MATERIAL_VISIBILITY_ALL, dcd.ubuf, shaderPipeline->ub0DirectionalLightDataOffset(),
sizeof(QSSGShaderDirectionalLightsUniformData));
327 QVector<QShaderDescription::InOutVariable> samplerVars =
328 shaderPipeline->fragmentStage()->shader().description().combinedImageSamplers();
329 const auto combinedSamplers = shaderPipeline->vertexStage()->shader().description().combinedImageSamplers();
330 for (
const QShaderDescription::InOutVariable &var : combinedSamplers) {
331 auto it = std::find_if(samplerVars.cbegin(), samplerVars.cend(),
332 [&var](
const QShaderDescription::InOutVariable &v) {
return var.binding == v.binding; });
333 if (it == samplerVars.cend())
334 samplerVars.append(var);
337 int maxSamplerBinding = -1;
338 for (
const QShaderDescription::InOutVariable &var : std::as_const(samplerVars))
339 maxSamplerBinding = qMax(maxSamplerBinding, var.binding);
348 QBitArray samplerBindingsSpecified(maxSamplerBinding + 1);
351 samplerBindingsSpecified.setBit(shaderPipeline->bindingForTexture(
"qt_particleTexture"));
354 if (QRhiTexture *boneTexture = layerData.getBonemapTexture(renderable.modelContext)) {
355 int binding = shaderPipeline->bindingForTexture(
"qt_boneTexture");
357 QRhiSampler *boneSampler = rhiCtx->sampler({ QRhiSampler::Nearest,
358 QRhiSampler::Nearest,
360 QRhiSampler::ClampToEdge,
361 QRhiSampler::ClampToEdge,
364 bindings.addTexture(binding,
365 QRhiShaderResourceBinding::VertexStage,
368 samplerBindingsSpecified.setBit(binding);
373 auto *targetsTexture = renderable.subset.rhi.targetsTexture;
374 if (targetsTexture) {
375 int binding = shaderPipeline->bindingForTexture(
"qt_morphTargetTexture");
377 QRhiSampler *targetsSampler = rhiCtx->sampler({ QRhiSampler::Nearest,
378 QRhiSampler::Nearest,
380 QRhiSampler::ClampToEdge,
381 QRhiSampler::ClampToEdge,
382 QRhiSampler::ClampToEdge
384 bindings.addTexture(binding, QRhiShaderResourceBinding::VertexStage, renderable.subset.rhi.targetsTexture, targetsSampler);
385 samplerBindingsSpecified.setBit(binding);
392 if (featureSet.isSet(QSSGShaderFeatures::Feature::ReflectionProbe)) {
393 int reflectionSampler = shaderPipeline->bindingForTexture(
"qt_reflectionMap");
394 QRhiTexture* reflectionTexture = layerData.getReflectionMapManager()->reflectionMapEntry(renderable.reflectionProbeIndex)->m_rhiPrefilteredCube;
395 const auto mipMapFilter = reflectionTexture && reflectionTexture->flags().testFlag(QRhiTexture::Flag::MipMapped)
396 ? QRhiSampler::Linear
398 QRhiSampler *sampler = rhiCtx->sampler(
399 { QRhiSampler::Linear, QRhiSampler::Linear, mipMapFilter, QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
400 if (reflectionSampler >= 0 && reflectionTexture) {
401 bindings.addTexture(reflectionSampler, QRhiShaderResourceBinding::FragmentStage, reflectionTexture, sampler);
402 samplerBindingsSpecified.setBit(reflectionSampler);
406 if (
int binding = shaderPipeline->bindingForTexture(
"qt_lightProbe",
int(QSSGRhiSamplerBindingHints::LightProbe));
408 auto texture = shaderPipeline->lightProbeTexture();
410 texture = rhiCtx->dummyTexture(QRhiTexture::CubeMap, resourceUpdates);
413 samplerBindingsSpecified.setBit(binding);
414 QPair<QSSGRenderTextureCoordOp, QSSGRenderTextureCoordOp> tiling = shaderPipeline->lightProbeTiling();
415 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear,
418 QSSGRhiHelpers::toRhi(tiling.first),
419 QSSGRhiHelpers::toRhi(tiling.second),
420 QRhiSampler::Repeat });
421 bindings.addTexture(binding, QRhiShaderResourceBinding::FragmentStage, texture, sampler);
424 if (shaderPipeline->screenTexture()) {
425 const int screenTextureBinding = shaderPipeline->bindingForTexture(
"qt_screenTexture",
int(QSSGRhiSamplerBindingHints::ScreenTexture));
426 const int screenTextureArrayBinding = shaderPipeline->bindingForTexture(
"qt_screenTextureArray",
int(QSSGRhiSamplerBindingHints::ScreenTextureArray));
427 if (screenTextureBinding >= 0 || screenTextureArrayBinding >= 0) {
428 QRhiTexture *screenTexture = shaderPipeline->screenTexture();
431 QRhiResourceUpdateBatch *resourceUpdates = rhiCtx->rhi()->nextResourceUpdateBatch();
433 const QRhiTexture::Flags flags = screenTexture->flags();
435 screenTexture = rhiCtx->dummyTexture(flags, resourceUpdates, QSize(64, 64), Qt::black, screenTexture->arraySize());
436 rhiCtx->commandBuffer()->resourceUpdate(resourceUpdates);
442 QRhiSampler::Filter mipFilter = shaderPipeline->screenTexture()->flags().testFlag(QRhiTexture::MipMapped)
443 ? QRhiSampler::Linear : QRhiSampler::None;
444 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear, QRhiSampler::Linear, mipFilter,
445 QRhiSampler::Repeat, QRhiSampler::Repeat, QRhiSampler::Repeat });
446 if (screenTextureBinding >= 0) {
447 samplerBindingsSpecified.setBit(screenTextureBinding);
448 bindings.addTexture(screenTextureBinding,
449 QRhiShaderResourceBinding::FragmentStage,
450 screenTexture, sampler);
452 if (screenTextureArrayBinding >= 0) {
453 samplerBindingsSpecified.setBit(screenTextureArrayBinding);
454 bindings.addTexture(screenTextureArrayBinding,
455 QRhiShaderResourceBinding::FragmentStage,
456 screenTexture, sampler);
461 if (shaderPipeline->depthTexture()) {
462 const int depthTextureBinding = shaderPipeline->bindingForTexture(
"qt_depthTexture",
int(QSSGRhiSamplerBindingHints::DepthTexture));
463 const int depthTextureArrayBinding = shaderPipeline->bindingForTexture(
"qt_depthTextureArray",
int(QSSGRhiSamplerBindingHints::DepthTextureArray));
464 if (depthTextureBinding >= 0 || depthTextureArrayBinding >= 0) {
466 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Nearest, QRhiSampler::Nearest, QRhiSampler::None,
467 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
468 if (depthTextureBinding >= 0) {
469 samplerBindingsSpecified.setBit(depthTextureBinding);
470 bindings.addTexture(depthTextureBinding,
471 CUSTOM_MATERIAL_VISIBILITY_ALL,
472 shaderPipeline->depthTexture(), sampler);
474 if (depthTextureArrayBinding >= 0) {
475 samplerBindingsSpecified.setBit(depthTextureArrayBinding);
476 bindings.addTexture(depthTextureArrayBinding,
477 CUSTOM_MATERIAL_VISIBILITY_ALL,
478 shaderPipeline->depthTexture(), sampler);
483 if (shaderPipeline->normalTexture()) {
484 const int normalTextureBinding = shaderPipeline->bindingForTexture(
"qt_normalTexture",
int(QSSGRhiSamplerBindingHints::NormalTexture));
485 if (normalTextureBinding >= 0) {
487 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Nearest, QRhiSampler::Nearest, QRhiSampler::None,
488 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
489 samplerBindingsSpecified.setBit(normalTextureBinding);
490 bindings.addTexture(normalTextureBinding, CUSTOM_MATERIAL_VISIBILITY_ALL, shaderPipeline->normalTexture(), sampler);
494 if (shaderPipeline->ssaoTexture()) {
495 const int ssaoTextureBinding = shaderPipeline->bindingForTexture(
"qt_aoTexture",
int(QSSGRhiSamplerBindingHints::AoTexture));
496 const int ssaoTextureArrayBinding = shaderPipeline->bindingForTexture(
"qt_aoTextureArray",
int(QSSGRhiSamplerBindingHints::AoTextureArray));
497 if (ssaoTextureBinding >= 0 || ssaoTextureArrayBinding >= 0) {
499 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None,
500 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
501 if (ssaoTextureBinding >= 0) {
502 samplerBindingsSpecified.setBit(ssaoTextureBinding);
503 bindings.addTexture(ssaoTextureBinding,
504 QRhiShaderResourceBinding::FragmentStage,
505 shaderPipeline->ssaoTexture(), sampler);
507 if (ssaoTextureArrayBinding >= 0) {
508 samplerBindingsSpecified.setBit(ssaoTextureArrayBinding);
509 bindings.addTexture(ssaoTextureArrayBinding,
510 QRhiShaderResourceBinding::FragmentStage,
511 shaderPipeline->ssaoTexture(), sampler);
516 if (shaderPipeline->lightmapTexture()) {
517 int binding = shaderPipeline->bindingForTexture(
"qt_lightmap",
int(QSSGRhiSamplerBindingHints::LightmapTexture));
519 samplerBindingsSpecified.setBit(binding);
520 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None,
521 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
522 bindings.addTexture(binding,
523 QRhiShaderResourceBinding::FragmentStage,
524 shaderPipeline->lightmapTexture(), sampler);
528 if (shaderPipeline->MotionVectorTexture()) {
529 int binding = shaderPipeline->bindingForTexture(
"qt_motionVectorTexture",
int(QSSGRhiSamplerBindingHints::MotionVectorTexture));
531 samplerBindingsSpecified.setBit(binding);
532 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None,
533 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
534 bindings.addTexture(binding,
535 QRhiShaderResourceBinding::FragmentStage,
536 shaderPipeline->MotionVectorTexture(), sampler);
542 auto shadowMapAtlas = shaderPipeline->shadowMapAtlasTexture();
543 if (shadowMapAtlas) {
544 int binding = shaderPipeline->bindingForTexture(
"qt_shadowmap_texture");
546 samplerBindingsSpecified.setBit(binding);
547 QRhiTexture *texture = shadowMapAtlas;
548 QRhiSampler *sampler = rhiCtx->sampler({ QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None,
549 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
550 Q_ASSERT(texture && sampler);
551 bindings.addTexture(binding, QRhiShaderResourceBinding::FragmentStage, texture, sampler);
556 if (
auto shadowMapBlueNoise = shaderPipeline->shadowMapBlueNoiseTexture()) {
557 int binding = shaderPipeline->bindingForTexture(
"qt_shadowmap_blue_noise_texture");
559 samplerBindingsSpecified.setBit(binding);
560 QRhiTexture *texture = shadowMapBlueNoise;
561 QRhiSampler *sampler = rhiCtx->sampler(
562 { QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None, QRhiSampler::Repeat, QRhiSampler::Repeat, QRhiSampler::Repeat });
563 Q_ASSERT(texture && sampler);
564 bindings.addTexture(binding, QRhiShaderResourceBinding::FragmentStage, texture, sampler);
568 QSSGRenderableImage *renderableImage = renderable.firstImage;
569 while (renderableImage) {
570 const char *samplerName = QSSGMaterialShaderGenerator::getSamplerName(renderableImage->m_mapType);
571 const int samplerHint =
int(renderableImage->m_mapType);
572 int samplerBinding = shaderPipeline->bindingForTexture(samplerName, samplerHint);
573 if (samplerBinding >= 0) {
574 QRhiTexture *texture = renderableImage->m_texture.m_texture;
575 if (samplerBinding >= 0 && texture) {
576 const bool mipmapped = texture->flags().testFlag(QRhiTexture::MipMapped);
577 QSSGRhiSamplerDescription samplerDesc = {
578 QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_minFilterType),
579 QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_magFilterType),
580 mipmapped ? QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_mipFilterType) : QRhiSampler::None,
581 QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_horizontalTilingMode),
582 QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_verticalTilingMode),
583 QSSGRhiHelpers::toRhi(renderableImage->m_imageNode.m_depthTilingMode)
585 rhiCtx->checkAndAdjustForNPoT(texture, &samplerDesc);
586 QRhiSampler *sampler = rhiCtx->sampler(samplerDesc);
587 samplerBindingsSpecified.setBit(samplerBinding);
588 bindings.addTexture(samplerBinding,
589 CUSTOM_MATERIAL_VISIBILITY_ALL,
593 renderableImage = renderableImage->m_nextImage;
596 if (maxSamplerBinding >= 0) {
598 int customTexCount = shaderPipeline->extraTextureCount();
599 for (
int i = 0; i < customTexCount; ++i) {
600 QSSGRhiTexture &t(shaderPipeline->extraTextureAt(i));
601 const int samplerBinding = shaderPipeline->bindingForTexture(t.name);
602 if (samplerBinding >= 0) {
603 samplerBindingsSpecified.setBit(samplerBinding);
604 rhiCtx->checkAndAdjustForNPoT(t.texture, &t.samplerDesc);
605 QRhiSampler *sampler = rhiCtx->sampler(t.samplerDesc);
606 bindings.addTexture(samplerBinding,
607 CUSTOM_MATERIAL_VISIBILITY_ALL,
614 QRhiSampler *dummySampler = rhiCtx->sampler({ QRhiSampler::Nearest, QRhiSampler::Nearest, QRhiSampler::None,
615 QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge, QRhiSampler::Repeat });
617 for (
const QShaderDescription::InOutVariable &var : std::as_const(samplerVars)) {
618 if (!samplerBindingsSpecified.testBit(var.binding)) {
619 QRhiTexture *t =
nullptr;
620 if (var.type == QShaderDescription::SamplerCube)
621 t = dummyCubeTexture;
622 else if (var.type == QShaderDescription::Sampler3D)
624 else if (var.type == QShaderDescription::Sampler2DArray)
625 t = dummyTextureArray;
626 else if (var.type == QShaderDescription::SamplerCubeArray)
627 t = dummyCubeTextureArray;
630 bindings.addTexture(var.binding, CUSTOM_MATERIAL_VISIBILITY_ALL, t, dummySampler);
634 shaderPipeline->applyAndClearStorageBindings(CUSTOM_MATERIAL_VISIBILITY_ALL, bindings);
636 QSSGRhiContextPrivate *rhiCtxD = QSSGRhiContextPrivate::get(rhiCtx);
638 if (oit && layerData.layer.oitMethod == QSSGRenderLayer::OITMethod::LinkedList)
639 RenderHelpers::addAccumulatorImageBindings(shaderPipeline.get(), bindings);
642 QRhiShaderResourceBindings *&srb = dcd.srb;
643 bool srbChanged =
false;
644 if (!srb || bindings != dcd.bindings) {
645 srb = rhiCtxD->srb(bindings);
646 rhiCtxD->releaseCachedSrb(dcd.bindings);
647 dcd.bindings = bindings;
651 if (cubeFace == QSSGRenderTextureCubeFaceNone)
652 renderable.rhiRenderData.mainPass.srb = srb;
654 renderable.rhiRenderData.reflectionPass.srb[cubeFaceIdx] = srb;
656 const auto pipelineKey = QSSGGraphicsPipelineStateKey::create(*ps, renderPassDescriptor, srb);
659 && dcd.renderTargetDescriptionHash == pipelineKey.extra.renderTargetDescriptionHash
660 && dcd.renderTargetDescription == pipelineKey.renderTargetDescription
663 if (cubeFace == QSSGRenderTextureCubeFaceNone)
664 renderable.rhiRenderData.mainPass.pipeline = dcd.pipeline;
666 renderable.rhiRenderData.reflectionPass.pipeline = dcd.pipeline;
668 if (cubeFace == QSSGRenderTextureCubeFaceNone) {
669 renderable.rhiRenderData.mainPass.pipeline = rhiCtxD->pipeline(pipelineKey,
670 renderPassDescriptor,
672 dcd.pipeline = renderable.rhiRenderData.mainPass.pipeline;
674 renderable.rhiRenderData.reflectionPass.pipeline = rhiCtxD->pipeline(pipelineKey,
675 renderPassDescriptor,
677 dcd.pipeline = renderable.rhiRenderData.reflectionPass.pipeline;
680 dcd.renderTargetDescriptionHash = pipelineKey.extra.renderTargetDescriptionHash;
681 dcd.renderTargetDescription = pipelineKey.renderTargetDescription;