16 #ifndef QGSSHADOWRENDERINGFRAMEGRAPH_H
17 #define QGSSHADOWRENDERINGFRAMEGRAPH_H
20 #include <Qt3DRender/QCamera>
21 #include <Qt3DRender/QRenderSurfaceSelector>
22 #include <Qt3DRender/QViewport>
23 #include <Qt3DRender/QCameraSelector>
24 #include <Qt3DRender/QLayerFilter>
25 #include <Qt3DRender/QLayer>
26 #include <Qt3DRender/QRenderTargetSelector>
27 #include <Qt3DRender/QRenderTarget>
28 #include <Qt3DRender/QTexture>
29 #include <Qt3DRender/QClearBuffers>
30 #include <Qt3DRender/QParameter>
31 #include <Qt3DRender/QFrustumCulling>
32 #include <Qt3DRender/QRenderStateSet>
33 #include <Qt3DRender/QDepthTest>
34 #include <Qt3DRender/QCullFace>
35 #include <Qt3DRender/QPolygonOffset>
36 #include <Qt3DRender/QRenderCapture>
82 Qt3DRender::QCamera *
mainCamera() {
return mMainCamera; }
116 void addTexturePreviewOverlay( Qt3DRender::QTexture2D *texture,
const QPointF ¢erNDC,
const QSizeF &size, QVector<Qt3DRender::QParameter *> additionalShaderParameters = QVector<Qt3DRender::QParameter *>() );
120 Qt3DRender::QRenderSurfaceSelector *mRenderSurfaceSelector =
nullptr;
121 Qt3DRender::QViewport *mMainViewPort =
nullptr;
122 Qt3DRender::QCameraSelector *mMainCameraSelector =
nullptr;
123 Qt3DRender::QLayerFilter *mForwardRenderLayerFilter =
nullptr;
124 Qt3DRender::QRenderTargetSelector *mForwardRenderTargetSelector =
nullptr;
125 Qt3DRender::QRenderTarget *mForwardRenderTarget =
nullptr;
126 Qt3DRender::QRenderTargetOutput *mForwardRenderTargetColorOutput =
nullptr;
127 Qt3DRender::QRenderTargetOutput *mForwardRenderTargetDepthOutput =
nullptr;
128 Qt3DRender::QTexture2D *mForwardColorTexture =
nullptr;
129 Qt3DRender::QTexture2D *mForwardDepthTexture =
nullptr;
130 Qt3DRender::QClearBuffers *mForwardClearBuffers =
nullptr;
131 Qt3DRender::QFrustumCulling *mFrustumCulling =
nullptr;
132 bool mFrustumCullingEnabled =
true;
134 Qt3DRender::QCamera *mMainCamera =
nullptr;
135 Qt3DRender::QLayerFilter *mPostprocessPassLayerFilter =
nullptr;
136 Qt3DRender::QClearBuffers *mPostprocessClearBuffers =
nullptr;
139 Qt3DRender::QLayerFilter *mPreviewLayerFilter =
nullptr;
140 Qt3DRender::QRenderStateSet *mPreviewRenderStateSet =
nullptr;
141 Qt3DRender::QDepthTest *mPreviewDepthTest =
nullptr;
142 Qt3DRender::QCullFace *mPreviewCullFace =
nullptr;
145 Qt3DRender::QRenderTargetSelector *mShadowRenderTargetSelector =
nullptr;
146 Qt3DRender::QRenderTarget *mShadowRenderTarget =
nullptr;
147 Qt3DRender::QRenderTargetOutput *mShadowRenderTargetOutput =
nullptr;
148 Qt3DRender::QTexture2D *mShadowMapTexture =
nullptr;
149 Qt3DRender::QClearBuffers *mShadowClearBuffers =
nullptr;
150 Qt3DRender::QCamera *mLightCamera =
nullptr;
151 Qt3DRender::QCameraSelector *mLightCameraSelector =
nullptr;
152 bool mShadowRenderingEnabled =
false;
153 float mShadowBias = 0.00001f;
154 int mShadowMapResolution = 2048;
156 Qt3DRender::QLayerFilter *mShadowSceneEntitiesFilter =
nullptr;
157 Qt3DRender::QRenderStateSet *mShadowRenderStateSet =
nullptr;
158 Qt3DRender::QCullFace *mShadowCullFace =
nullptr;
159 Qt3DRender::QDepthTest *mShadowDepthTest =
nullptr;
161 Qt3DRender::QRenderCapture *mRenderCapture =
nullptr;
163 QVector3D mLightDirection = QVector3D( 0.0, -1.0f, 0.0f );
165 Qt3DCore::QEntity *mRootEntity =
nullptr;
167 Qt3DRender::QLayer *mPostprocessPassLayer =
nullptr;
168 Qt3DRender::QLayer *mPreviewLayer =
nullptr;
169 Qt3DRender::QLayer *mForwardRenderLayer =
nullptr;
170 Qt3DRender::QLayer *mCastShadowsLayer =
nullptr;
174 QVector<QgsPreviewQuad *> mPreviewQuads;
176 Qt3DRender::QFrameGraphNode *constructShadowRenderPass();
177 Qt3DRender::QFrameGraphNode *constructForwardRenderPass();
178 Qt3DRender::QFrameGraphNode *constructTexturesPreviewPass();
179 Qt3DRender::QFrameGraphNode *constructPostprocessingPass();
184 #endif // QGSSHADOWRENDERINGFRAMEGRAPH_H