![]() |
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 "qssgdebugdrawsystem_p.h"
#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 "rendererimpl/qssgshadowmaphelpers_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 575 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 364 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 129 of file qssgrenderhelpers.cpp.
References QMatrix4x4::inverted(), and Q_ASSERT.
Referenced by RenderHelpers::rhiRenderShadowMap().
|
static |
Definition at line 143 of file qssgrenderhelpers.cpp.
References QMatrix4x4::inverted(), and Q_ASSERT.
Referenced by computeShadowCameraFromFrustum().
|
static |
Definition at line 159 of file qssgrenderhelpers.cpp.
References ShadowmapHelpers::addDebugFrustum(), QColorConstants::Black, QSSGRenderNode::calculateTransformMatrix(), camera, computeFrustumBoundsWithNearFar(), QColorConstants::DarkGray, i, QSSGBounds3::include(), QSSGRenderNode::initScale, ShadowmapHelpers::intersectBoxByBox(), ShadowmapHelpers::intersectBoxByFrustum(), QObject::parent(), Q_ASSERT, qDegreesToRadians(), qMax(), and qMin().
Referenced by setupCascadingCamerasForShadowMap().
|
static |
Definition at line 758 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 536 of file qssgrenderhelpers.cpp.
References QSSGShaderFeatures::DisableMultiView, renderer, QSSGShaderFeatures::set(), QSSGRenderLayer::SkyBox, and QSSGRenderLayer::SkyBoxCubeMap.
Referenced by RenderHelpers::rhiRenderReflectionMap().
|
static |
Definition at line 615 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 1831 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 247 of file qssgrenderhelpers.cpp.
References camera, computeShadowCameraFromFrustum(), QVector3D::crossProduct(), i, QMatrix4x4::inverted(), QVector3D::normalized(), Q_ASSERT, qAbs(), qBound(), qFuzzyCompare(), qMax(), qMin(), QMatrix4x4::setRow(), and QVector3D::y().
Referenced by RenderHelpers::rhiRenderShadowMap().
|
static |
Definition at line 334 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 458 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 518 of file qssgrenderhelpers.cpp.
References QSSGRhiInputAssemblerStatePrivate::get(), QRhiVertexInputBinding::PerInstance, and QSSGLayerRenderData::prepareInstancing().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 28 of file qssgrenderhelpers.cpp.
References QSSGRendererPrivate::getShaderPipelineForDefaultMaterial(), renderer, and QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline().
Referenced by RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
|
static |
Definition at line 39 of file qssgrenderhelpers.cpp.
References renderer, QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline(), and QSSGRhiGraphicsPipelineState::viewCount.
Referenced by RenderHelpers::rhiPrepareRenderable().
|
static |
Definition at line 51 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 23 of file qssgrenderhelpers.cpp.
Referenced by setupCubeReflectionCameras(), and setupCubeShadowCameras().
|
staticconstexpr |
Definition at line 22 of file qssgrenderhelpers.cpp.
Referenced by setupCubeReflectionCameras(), and setupCubeShadowCameras().
|
static |
Definition at line 25 of file qssgrenderhelpers.cpp.
Referenced by addOpaqueDepthPrePassBindings(), RenderHelpers::rhiPrepareDepthPass(), RenderHelpers::rhiPrepareGrid(), RenderHelpers::rhiPrepareRenderable(), rhiPrepareResourcesForShadowMap(), rhiPrepareSkyBox_helper(), and RenderHelpers::rhiRenderAoTexture().