7namespace qml_material::sg
10enum class BlurStyle :
int {
29 QSGMaterialShader* createShader(QSGRendererInterface::RenderMode)
const override;
30 QSGMaterialType* type()
const override;
31 int compare(
const QSGMaterial* other)
const override;
35 auto profile_texture() -> QSGTexture*;
40 auto corner_texture() -> QSGTexture*;
44 QVector2D rect_size { 0.0f, 0.0f };
45 QVector4D radius { 0.0f, 0.0f, 0.0f, 0.0f };
46 BlurStyle style { BlurStyle::Normal };
53 QSGTexture* m_profile_texture {
nullptr };
54 QSGTexture* m_corner_texture {
nullptr };
57class BlurMaskShader :
public QSGMaterialShader {
61 bool updateUniformData(QSGMaterialShader::RenderState& state, QSGMaterial* newMaterial,
62 QSGMaterial* oldMaterial)
override;
64 void updateSampledImage(RenderState&,
int binding, QSGTexture** texture,
65 QSGMaterial* newMaterial, QSGMaterial*)
override;
Definition blur_mask_material.h:24
float effective_radius() const
Effective uniform radius used by the shader (= max of the 4 radii).
Definition blur_mask_material.cpp:26
void init_corner_texture(QQuickWindow *win, float sigma, float radius)
Definition blur_mask_material.cpp:67
void init_profile_texture(QQuickWindow *win)
Bind the per-window shared 1D unit-CDF profile texture. Cheap.
Definition blur_mask_material.cpp:63