16#ifndef QGSMETALROUGHMATERIAL_H 
   17#define QGSMETALROUGHMATERIAL_H 
   32  class QAbstractTexture;
 
   36  class QShaderProgramBuilder;
 
   48class _3D_EXPORT QgsMetalRoughMaterial : 
public QgsMaterial 
   55    explicit QgsMetalRoughMaterial( Qt3DCore::QNode *parent = 
nullptr );
 
   56    ~QgsMetalRoughMaterial() 
override;
 
   58    QVariant baseColor() 
const;
 
   59    QVariant metalness() 
const;
 
   60    QVariant roughness() 
const;
 
   61    QVariant ambientOcclusion() 
const;
 
   62    QVariant normal() 
const;
 
   63    float textureScale() 
const;
 
   72    bool flatShadingEnabled() 
const;
 
   75    void setBaseColor( 
const QVariant &baseColor );
 
   76    void setMetalness( 
const QVariant &metalness );
 
   77    void setRoughness( 
const QVariant &roughness );
 
   78    void setAmbientOcclusion( 
const QVariant &ambientOcclusion );
 
   79    void setNormal( 
const QVariant &normal );
 
   80    void setTextureScale( 
float textureScale );
 
   81    void setFlatShadingEnabled( 
bool enabled );
 
   84    void baseColorChanged( 
const QVariant &baseColor );
 
   85    void metalnessChanged( 
const QVariant &metalness );
 
   86    void roughnessChanged( 
const QVariant &roughness );
 
   87    void ambientOcclusionChanged( 
const QVariant &ambientOcclusion );
 
   88    void normalChanged( 
const QVariant &normal );
 
   89    void textureScaleChanged( 
float textureScale );
 
   94    void handleTextureScaleChanged( 
const QVariant &var );
 
   95    void updateFragmentShader();
 
   97    Qt3DRender::QParameter *mBaseColorParameter = 
nullptr;
 
   98    Qt3DRender::QParameter *mMetalnessParameter = 
nullptr;
 
   99    Qt3DRender::QParameter *mRoughnessParameter = 
nullptr;
 
  100    Qt3DRender::QParameter *mBaseColorMapParameter = 
nullptr;
 
  101    Qt3DRender::QParameter *mMetalnessMapParameter = 
nullptr;
 
  102    Qt3DRender::QParameter *mRoughnessMapParameter = 
nullptr;
 
  103    Qt3DRender::QParameter *mAmbientOcclusionMapParameter = 
nullptr;
 
  104    Qt3DRender::QParameter *mNormalMapParameter = 
nullptr;
 
  105    Qt3DRender::QParameter *mTextureScaleParameter = 
nullptr;
 
  106    Qt3DRender::QEffect *mMetalRoughEffect = 
nullptr;
 
  107    Qt3DRender::QTechnique *mMetalRoughGL3Technique = 
nullptr;
 
  108    Qt3DRender::QRenderPass *mMetalRoughGL3RenderPass = 
nullptr;
 
  109    Qt3DRender::QShaderProgram *mMetalRoughGL3Shader = 
nullptr;
 
  110    Qt3DRender::QFilterKey *mFilterKey = 
nullptr;
 
  111    bool mUsingBaseColorMap = 
false;
 
  112    bool mUsingMetalnessMap = 
false;
 
  113    bool mUsingRoughnessMap = 
false;
 
  114    bool mUsingAmbientOcclusionMap = 
false;
 
  115    bool mUsingNormalMap = 
false;
 
  116    bool mFlatShading = 
false;
 
Base class for all materials used within QGIS 3D views.