Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "qssgrenderhelpers_p.h"
#include "qssgrenderer_p.h"
#include "qssglayerrenderdata_p.h"
#include "qssgrhiparticles_p.h"
#include "qssgrhiquadrenderer_p.h"
#include "../qssgrendercontextcore.h"
#include "../qssgrhicustommaterialsystem_p.h"
#include "../resourcemanager/qssgrenderbuffermanager_p.h"
#include "../qssgrenderdefaultmaterialshadergenerator_p.h"
#include <QtQuick3DUtils/private/qssgassert_p.h>
#include <QtCore/qbitarray.h>
Go to the source code of this file.
Variables | |
static QT_BEGIN_NAMESPACE constexpr float | QSSG_PI = float(M_PI) |
static constexpr float | QSSG_HALFPI = float(M_PI_2) |
static const QRhiShaderResourceBinding::StageFlags | RENDERER_VISIBILITY_ALL |
|
inlinestatic |
Definition at line 498 of file qssgrenderhelpers.cpp.
References QSSGRhiShaderResourceBindingList::addTexture(), AoTexture, AoTextureArray, QSSGRhiShaderPipeline::bindingForTexture(), QRhiSampler::ClampToEdge, DepthTexture, QSSGRhiShaderPipeline::depthTexture(), DepthTextureArray, QRhiShaderResourceBinding::FragmentStage, QRhiSampler::Linear, QRhiSampler::Nearest, QRhiSampler::None, QRhiSampler::Repeat, QSSGRhiContext::sampler(), and QSSGRhiShaderPipeline::ssaoTexture().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 287 of file qssgrenderhelpers.cpp.
References QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderPipeline::bindingForTexture(), QSet< T >::cend(), QRhiSampler::ClampToEdge, QShaderDescription::combinedImageSamplers(), QSSGRhiContext::commandBuffer(), QRhiTexture::CubeMap, QShader::description(), QSSGRhiContext::dummyTexture(), QSSGRhiShaderPipeline::extraTextureAt(), QSSGRhiShaderPipeline::extraTextureCount(), QRhiTexture::flags(), QSSGRhiShaderPipeline::fragmentStage(), QSSGMaterialShaderGenerator::getSamplerName(), i, it, QRhiTexture::MipMapped, QRhiSampler::Nearest, QRhi::nextResourceUpdateBatch(), QRhiSampler::None, qMax(), RENDERER_VISIBILITY_ALL, QRhiSampler::Repeat, QRhiCommandBuffer::resourceUpdate(), QSSGRhiContext::rhi(), QSSGRhiContext::sampler(), QShaderDescription::SamplerCube, QRhiShaderStage::shader(), QSSGRhiHelpers::toRhi(), var, and QSSGRhiShaderPipeline::vertexStage().
Referenced by RenderHelpers::rhiPrepareDepthPass(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 119 of file qssgrenderhelpers.cpp.
References i.
Referenced by setupCameraForShadowMap().
|
static |
Definition at line 128 of file qssgrenderhelpers.cpp.
References QVector3D::dotProduct(), i, and QSSGBounds3::include().
Referenced by setupCameraForShadowMap().
|
static |
Definition at line 140 of file qssgrenderhelpers.cpp.
References QMatrix4x4::inverted(), and Q_ASSERT.
Referenced by setupCameraForShadowMap().
|
static |
Definition at line 683 of file qssgrenderhelpers.cpp.
References QRhiGraphicsPipeline::TargetBlend::dstAlpha, QRhiGraphicsPipeline::DstColor, QRhiGraphicsPipeline::TargetBlend::dstColor, QSSGRenderDefaultMaterial::Multiply, QRhiGraphicsPipeline::One, QRhiGraphicsPipeline::OneMinusSrcAlpha, QSSGRenderDefaultMaterial::Screen, QRhiGraphicsPipeline::SrcAlpha, QRhiGraphicsPipeline::TargetBlend::srcAlpha, QRhiGraphicsPipeline::TargetBlend::srcColor, and QRhiGraphicsPipeline::Zero.
Referenced by RenderHelpers::rhiPrepareRenderable().
|
static |
Definition at line 459 of file qssgrenderhelpers.cpp.
References QSSGShaderFeatures::DisableMultiView, renderer, QSSGShaderFeatures::set(), QSSGRenderLayer::SkyBox, and QSSGRenderLayer::SkyBoxCubeMap.
Referenced by RenderHelpers::rhiRenderReflectionMap().
|
static |
Definition at line 538 of file qssgrenderhelpers.cpp.
References addDepthTextureBindings(), addOpaqueDepthPrePassBindings(), QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderResourceBindingList::addUniformBuffer(), QSSGRhiHelpers::bakeVertexInputLocations(), Qt::black, QSSGRhiContext::commandBuffer(), QSSGShaderFeatures::CubeShadowPass, QSSGRhiGraphicsPipelineState::cullMode, direction, QSSGShaderFeatures::DisableMultiView, QSSGRhiContext::dummyTexture(), QRhiShaderResourceBinding::FragmentStage, QSSGRhiInputAssemblerStatePrivate::get(), QSSGRhiContextPrivate::get(), QSSGBaseTypeHelpers::indexOfCubeFace(), QSSGRhiContext::mainPassViewCount(), QRhiSampler::Nearest, QRhi::nextResourceUpdateBatch(), QRhiSampler::None, QSSGShaderFeatures::OpaqueDepthPrePass, OpaquePrePass, QSSGShaderFeatures::OrthoShadowPass, position(), QSSGParticleRenderer::prepareParticlesForModel(), QSSG_ASSERT, QSSGRenderTextureCubeFaceNone, RENDERER_VISIBILITY_ALL, QRhiSampler::Repeat, QRhiCommandBuffer::resourceUpdate(), QSSGRhiContext::rhi(), QSSGRhiContext::sampler(), ScreenTexture, ScreenTextureArray, QSSGShaderFeatures::set(), QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline(), setupInstancing(), QSSGCustomMaterialSystem::shadersForCustomMaterial(), shadersForDefaultMaterial(), QSSGRhiHelpers::toCullMode(), QSSGCustomMaterialSystem::updateUniformsForCustomMaterial(), updateUniformsForDefaultMaterial(), and QSSGParticleRenderer::updateUniformsForParticleModel().
Referenced by RenderHelpers::rhiRenderShadowMap().
|
static |
Definition at line 1778 of file qssgrenderhelpers.cpp.
References QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderResourceBindingList::addUniformBuffer(), QRhiSampler::ClampToEdge, QMatrix4x4::constData(), QVarLengthArray< T, Prealloc >::count(), QRhiBuffer::create(), QRhiBuffer::Dynamic, QRhiShaderResourceBinding::FragmentStage, QSSGRhiContextPrivate::get(), QSSGBaseTypeHelpers::indexOfCubeFace(), QSSGRenderImageTextureFlags::isRgbe8(), QRhi::isYUpInNDC(), QRhiSampler::Linear, QSSGRenderImageTexture::m_flags, QSSGRenderImageTexture::m_mipmapCount, QSSGRenderImageTexture::m_texture, QSSGBufferManager::MipModeBsdf, QSSGBufferManager::MipModeDisable, QRhi::newBuffer(), QRhiSampler::None, QSSGRenderTextureCubeFaceNone, renderer, RENDERER_VISIBILITY_ALL, QRhiSampler::Repeat, QSSGRhiContext::rhi(), QSSGRhiContext::sampler(), QSSGRenderLayer::SkyBoxCubeMap, QRhiBuffer::UniformBuffer, and Qt::Uninitialized.
Referenced by RenderHelpers::rhiPrepareSkyBox(), and RenderHelpers::rhiPrepareSkyBoxForReflectionMap().
|
static |
Definition at line 184 of file qssgrenderhelpers.cpp.
References a0, a1, calcCenter(), calculateShadowCameraBoundingBox(), QSSGRenderNode::calculateTransformMatrix(), computeFrustumBounds(), QVector3D::crossProduct(), d, QVector3D::dotProduct(), QSSGRenderNode::initScale, QVector3D::normalized(), Q_ASSERT, qAbs(), qDegreesToRadians(), qFuzzyCompare(), qMax(), qMin(), and QVector3D::y().
Referenced by RenderHelpers::rhiRenderShadowMap().
|
static |
Definition at line 154 of file qssgrenderhelpers.cpp.
References QSSGRenderNode::calculateTransformMatrix(), i, QSSGRenderNode::initScale, Q_ASSERT, qDegreesToRadians(), qRadiansToDegrees(), QSSG_HALFPI, and QSSG_PI.
Referenced by RenderHelpers::rhiRenderReflectionMap().
|
static |
Definition at line 381 of file qssgrenderhelpers.cpp.
References QSSGRenderNode::calculateTransformMatrix(), i, QSSGRenderNode::initScale, Q_ASSERT, qDegreesToRadians(), qRadiansToDegrees(), QSSG_HALFPI, and QSSG_PI.
Referenced by RenderHelpers::rhiRenderShadowMap().
|
static |
Definition at line 441 of file qssgrenderhelpers.cpp.
References QSSGRhiInputAssemblerStatePrivate::get(), QRhiVertexInputBinding::PerInstance, and QSSGLayerRenderData::prepareInstancing().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 26 of file qssgrenderhelpers.cpp.
References QSSGRendererPrivate::getShaderPipelineForDefaultMaterial(), renderer, and QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 37 of file qssgrenderhelpers.cpp.
References renderer, QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline(), and QSSGRhiGraphicsPipelineState::viewCount.
Referenced by RenderHelpers::rhiPrepareRenderable().
|
static |
Definition at line 49 of file qssgrenderhelpers.cpp.
References QRhi::clipSpaceCorrMatrix(), renderer, QSSGRhiContext::rhi(), QSSGMaterialShaderGenerator::setRhiMaterialProperties(), and toDataView().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
staticconstexpr |
Definition at line 21 of file qssgrenderhelpers.cpp.
Referenced by setupCubeReflectionCameras(), and setupCubeShadowCameras().
|
staticconstexpr |
Definition at line 20 of file qssgrenderhelpers.cpp.
Referenced by setupCubeReflectionCameras(), and setupCubeShadowCameras().
|
static |
Definition at line 23 of file qssgrenderhelpers.cpp.
Referenced by addOpaqueDepthPrePassBindings(), RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareGrid(), RenderHelpers::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), rhiPrepareSkyBox_helper(), RenderHelpers::rhiRenderAoTexture(), and RenderHelpers::rhiRenderShadowMap().