QGIS API Documentation 4.1.0-Master (9af12b5a203)
Loading...
Searching...
No Matches
QgsBloomRenderView Class Reference

Container class that holds different objects related to bloom rendering. More...

#include <qgsbloomrenderview.h>

Inheritance diagram for QgsBloomRenderView:

Public Member Functions

 QgsBloomRenderView (const QString &viewName, Qt3DRender::QTexture2D *sourceColorTexture, const QSize &size, Qt3DCore::QEntity *rootSceneEntity)
 Default constructor.
 ~QgsBloomRenderView () override
Qt3DRender::QTexture2D * bloomTexture () const
 Returns the texture containing the final bloom effect.
void setAspectRatio (float ratio)
 Sets the aspect ratio of the view.
void setEnabled (bool enabled) override
 Enable or disable via enable the render view sub tree.
void setFilterRadius (float radius)
 Sets the bloom filter radius.
void updateWindowResize (int width, int height) override
 Called when 3D window is resized.
Public Member Functions inherited from QgsAbstractRenderView
 QgsAbstractRenderView (const QgsAbstractRenderView &other)=delete
 Disabled copy constructor.
 QgsAbstractRenderView (const QString &viewName)
 Constructor for QgsAbstractRenderView with the specified parent object.
virtual ~QgsAbstractRenderView ()
 Default destructor.
virtual bool isEnabled () const
 Returns true if render view is enabled.
QgsAbstractRenderViewoperator= (const QgsAbstractRenderView &other)=delete
 Disabled operator=.
QPointer< Qt3DRender::QFrameGraphNode > topGraphNode () const
 Returns the top node of this render view branch. Will be used to register the render view.

Additional Inherited Members

Protected Attributes inherited from QgsAbstractRenderView
Qt3DRender::QSubtreeEnabler * mRendererEnabler = nullptr
QPointer< Qt3DRender::QFrameGraphNode > mRoot
QString mViewName

Detailed Description

Container class that holds different objects related to bloom rendering.

This render view implements a HDR bloom effect, following the CoD: Advanced Warfare approach, from ACM Siggraph 2014.

This technique mimics the physical scattering of light inside a camera lens using a dual-filtering mip-chain. It operates in two phases:

  • Downsampling: Progressively scales down the HDR scene texture across several mip levels using a specialized 13-tap filter. This filter prevents temporal aliasing (flickering) of bright, sub-pixel highlights.
  • Upsampling: Progressively reconstructs the image back up the mip-chain using a 9-tap tent filter, additively blending each level together.
Note
Not available in Python bindings
Since
QGIS 4.2

Definition at line 62 of file qgsbloomrenderview.h.

Constructor & Destructor Documentation

◆ QgsBloomRenderView()

QgsBloomRenderView::QgsBloomRenderView ( const QString & viewName,
Qt3DRender::QTexture2D * sourceColorTexture,
const QSize & size,
Qt3DCore::QEntity * rootSceneEntity )

Default constructor.

Definition at line 40 of file qgsbloomrenderview.cpp.

◆ ~QgsBloomRenderView()

QgsBloomRenderView::~QgsBloomRenderView ( )
overridedefault

Member Function Documentation

◆ bloomTexture()

Qt3DRender::QTexture2D * QgsBloomRenderView::bloomTexture ( ) const

Returns the texture containing the final bloom effect.

Definition at line 56 of file qgsbloomrenderview.cpp.

◆ setAspectRatio()

void QgsBloomRenderView::setAspectRatio ( float ratio)

Sets the aspect ratio of the view.

Definition at line 66 of file qgsbloomrenderview.cpp.

◆ setEnabled()

void QgsBloomRenderView::setEnabled ( bool enable)
overridevirtual

Enable or disable via enable the render view sub tree.

Reimplemented from QgsAbstractRenderView.

Definition at line 197 of file qgsbloomrenderview.cpp.

◆ setFilterRadius()

void QgsBloomRenderView::setFilterRadius ( float radius)

Sets the bloom filter radius.

The default radius is 0.005.

Definition at line 61 of file qgsbloomrenderview.cpp.

◆ updateWindowResize()

void QgsBloomRenderView::updateWindowResize ( int width,
int height )
overridevirtual

Called when 3D window is resized.

Render views may update their textures accordingly. Default implementation does nothing.

Reimplemented from QgsAbstractRenderView.

Definition at line 169 of file qgsbloomrenderview.cpp.


The documentation for this class was generated from the following files: