7#include <QtQuick3DRuntimeRender/private/qssgrenderer_p.h>
8#include <QtQuick3DRuntimeRender/private/qssgrenderlight_p.h>
10#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
11#include <QtQuick3DRuntimeRender/private/qssgrendershaderlibrarymanager_p.h>
12#include <QtQuick3DRuntimeRender/private/qssgrendershadercodegenerator_p.h>
13#include <QtQuick3DRuntimeRender/private/qssgrenderdefaultmaterialshadergenerator_p.h>
14#include <QtQuick3DRuntimeRender/private/qssgvertexpipelineimpl_p.h>
30 storage.shaderPipeline = m_shaderCache.loadBuiltinUncached(
name, viewCount);
44 return getBuiltinRhiShader(
QByteArrayLiteral(
"cubeshadowblurx"), m_cache.cubemapShadowBlurXRhiShader);
49 return getBuiltinRhiShader(
QByteArrayLiteral(
"cubeshadowblury"), m_cache.cubemapShadowBlurYRhiShader);
54 return getBuiltinRhiShader(
QByteArrayLiteral(
"grid"), m_cache.gridShader, viewCount);
59 return getBuiltinRhiShader(
QByteArrayLiteral(
"orthoshadowblurx"), m_cache.orthographicShadowBlurXRhiShader);
64 return getBuiltinRhiShader(
QByteArrayLiteral(
"orthoshadowblury"), m_cache.orthographicShadowBlurYRhiShader);
69 return getBuiltinRhiShader(
QByteArrayLiteral(
"ssao"), m_cache.ssaoRhiShader, viewCount);
74 return getBuiltinRhiShader(
QByteArrayLiteral(
"skyboxcube"), m_cache.skyBoxCubeRhiShader, viewCount);
79 switch (tonemapMode) {
94 Q_UNREACHABLE_RETURN(0);
101 static constexpr char variant[][23] {
"skybox_hdr_none",
104 "skybox_hdr_hejldawson",
108 "skybox_rgbe_linear",
110 "skybox_rgbe_hejldawson",
111 "skybox_rgbe_filmic",
112 "skybox_rgbe_custom",
121 return getBuiltinRhiShader(
QByteArrayLiteral(
"ssaaresolve"), m_cache.supersampleResolveRhiShader, viewCount);
126 return getBuiltinRhiShader(
QByteArrayLiteral(
"progressiveaa"), m_cache.progressiveAARhiShader);
131 switch (featureLevel) {
133 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesnolightsimple"), m_cache.particlesNoLightingSimpleRhiShader, viewCount);
136 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesnolightmapped"), m_cache.particlesNoLightingMappedRhiShader, viewCount);
139 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesnolightanimated"), m_cache.particlesNoLightingAnimatedRhiShader, viewCount);
142 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesvlightsimple"), m_cache.particlesVLightingSimpleRhiShader, viewCount);
145 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesvlightmapped"), m_cache.particlesVLightingMappedRhiShader, viewCount);
148 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesvlightanimated"), m_cache.particlesVLightingAnimatedRhiShader, viewCount);
151 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticles"), m_cache.lineParticlesRhiShader, viewCount);
154 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticlesmapped"), m_cache.lineParticlesMappedRhiShader, viewCount);
157 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticlesanimated"), m_cache.lineParticlesAnimatedRhiShader, viewCount);
160 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticlesvlightsimple"), m_cache.lineParticlesVLightRhiShader, viewCount);
163 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticlesvlightmapped"), m_cache.lineParticlesMappedVLightRhiShader, viewCount);
166 return getBuiltinRhiShader(
QByteArrayLiteral(
"lineparticlesvlightanimated"), m_cache.lineParticlesAnimatedVLightRhiShader, viewCount);
169 return getBuiltinRhiShader(
QByteArrayLiteral(
"particlesnolightanimated"), m_cache.particlesNoLightingAnimatedRhiShader, viewCount);
174 return getBuiltinRhiShader(
QByteArrayLiteral(
"simplequad"), m_cache.simpleQuadRhiShader, viewCount);
181 return getBuiltinRhiShader(
QByteArrayLiteral(
"lightmapuvraster_uv"), m_cache.lightmapUVRasterShader_uv);
183 return getBuiltinRhiShader(
QByteArrayLiteral(
"lightmapuvraster_uv_tangent"), m_cache.lightmapUVRasterShader_uv_tangent);
185 return getBuiltinRhiShader(
QByteArrayLiteral(
"lightmapuvraster"), m_cache.lightmapUVRasterShader);
188 Q_UNREACHABLE_RETURN(getBuiltinRhiShader(
QByteArrayLiteral(
"lightmapuvraster"), m_cache.lightmapUVRasterShader));
193 return getBuiltinRhiShader(
QByteArrayLiteral(
"lightmapdilate"), m_cache.lightmapDilateShader);
198 return getBuiltinRhiShader(
QByteArrayLiteral(
"debugobject"), m_cache.debugObjectShader);
203 return getBuiltinRhiShader(
QByteArrayLiteral(
"reflectionprobeprefilter"), m_cache.reflectionprobePreFilterShader);
208 static constexpr char variant[][29] {
"environmentmapprefilter",
"environmentmapprefilter_rgbe" };
215 return getBuiltinRhiShader(
QByteArrayLiteral(
"environmentmap"), m_cache.environmentmapShader);
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
QSSGRhiShaderPipelinePtr getRhiOrthographicShadowBlurXShader()
QSSGRhiShaderPipelinePtr getRhiSkyBoxCubeShader(int viewCount)
QSSGRhiShaderPipelinePtr getRhiParticleShader(QSSGRenderParticles::FeatureLevel featureLevel, int viewCount)
QSSGRhiShaderPipelinePtr getRhiOrthographicShadowBlurYShader()
QSSGRhiShaderPipelinePtr getRhiCubemapShadowBlurXShader()
QSSGRhiShaderPipelinePtr getRhiSsaoShader(int viewCount)
QSSGRhiShaderPipelinePtr getRhiSimpleQuadShader(int viewCount)
QSSGRhiShaderPipelinePtr getRhiReflectionprobePreFilterShader()
QSSGRhiShaderPipelinePtr getRhiProgressiveAAShader()
QSSGRhiShaderPipelinePtr getRhiEnvironmentmapShader()
LightmapUVRasterizationShaderMode
QSSGRhiShaderPipelinePtr getRhienvironmentmapPreFilterShader(bool isRGBE)
QSSGRhiShaderPipelinePtr getRhiSupersampleResolveShader(int viewCount)
QSSGRhiShaderPipelinePtr getRhiLightmapUVRasterizationShader(LightmapUVRasterizationShaderMode mode)
QSSGRhiShaderPipelinePtr getRhiLightmapDilateShader()
QSSGRhiShaderPipelinePtr getRhiDebugObjectShader()
void releaseCachedResources()
QSSGRhiShaderPipelinePtr getRhiGridShader(int viewCount)
QSSGRhiShaderPipelinePtr getRhiSkyBoxShader(QSSGRenderLayer::TonemapMode tonemapMode, bool isRGBE, int viewCount)
QSSGRhiShaderPipelinePtr getRhiCubemapShadowBlurYShader()
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
static constexpr size_t getSkyboxIndex(QSSGRenderLayer::TonemapMode tonemapMode, bool isRGBE)
std::shared_ptr< QSSGRhiShaderPipeline > QSSGRhiShaderPipelinePtr
static size_t constexpr TonemapModeCount