Post-processing effect for blurring the scene. More...
Header: | #include <Kuesa/GaussianBlurEffect> |
Since: | Kuesa 1.0 |
Inherits: | Kuesa::AbstractPostProcessingEffect |
This class was introduced in Kuesa 1.0.
int | blurPassCount() const |
virtual Kuesa::AbstractPostProcessingEffect::FrameGraphNodePtr | frameGraphSubTree() const override |
virtual void | setInputTexture(Qt3DRender::QAbstractTexture *texture) override |
virtual void | setWindowSize(const QSize &size) override |
void | setBlurPassCount(int blurPassCount) |
void | blurPassCountChanged(int blurPassCount) |
GaussianBlurEffect is a post-processing effect that applies a Gaussian blur to the scene. The amount of blurring can be adjusted using the blurPassCount property.
#include <Qt3DExtras/Qt3DWindow> #include <ForwardRenderer> #include <SceneEntity> #include <GaussianBlurEffect> Qt3DExtras::Qt3DWindow win; Kuesa::SceneEntity *root = new Kuesa::SceneEntity(); Kuesa::ForwardRenderer *frameGraph = new Kuesa::ForwardRenderer(); Kuesa::GaussianBlurEffect *blurEffect = new Kuesa::GaussianBlurEffect(); blurEffect->setBlurPassCount(2); frameGraph->addPostProcessingEffect(blurEffect); win->setRootEntity(root); win->setActiveFrameGraph(forwardRenderer); ...
Blur effect applied on a Kuesa scene.
Note: Increasing the number of passes too high may adversely impact rendering performance, especially on lower-end GPUs.
This property holds the number of blur passes
This is the number of times to apply the blur filter. More passes result in stronger blurring effect but take longer to render.
Access functions:
int | blurPassCount() const |
void | setBlurPassCount(int blurPassCount) |
Notifier signal:
void | blurPassCountChanged(int blurPassCount) |
[slot]
void GaussianBlurEffect::setBlurPassCount(int blurPassCount)Sets the number of blur passes to blurPassCount.
Note: Setter function for property blurPassCount.
See also GaussianBlurEffect::blurPassCount.
Returns the number of blur passes.
Note: Getter function for property blurPassCount.
See also GaussianBlurEffect::setBlurPassCount.
[override virtual]
Kuesa::AbstractPostProcessingEffect::FrameGraphNodePtr GaussianBlurEffect::frameGraphSubTree() constReturns the frame graph subtree corresponding to the effect's implementation.
See also AbstractPostProcessingEffect::frameGraphSubTree.
[override virtual]
void GaussianBlurEffect::setInputTexture(Qt3DRender::QAbstractTexture *texture)Sets the input texture for the effect to texture.
See also AbstractPostProcessingEffect::setInputTexture.
[override virtual]
void GaussianBlurEffect::setWindowSize(const QSize &size)Reimplements: AbstractPostProcessingEffect::setWindowSize(const QSize &sceneSize).
Sets the size of the rendered scene in pixels to size. This is required to keep a consistent amount of blurring when the scene is resized.
See also AbstractPostProcessingEffect::setSceneSize.