34 Q_PROPERTY(
bool baseColorSingleChannelEnabled READ baseColorSingleChannelEnabled WRITE setBaseColorSingleChannelEnabled NOTIFY baseColorSingleChannelEnabledChanged REVISION(6, 8))
37 Q_PROPERTY(
float metalness READ metalness WRITE setMetalness NOTIFY metalnessChanged)
41 Q_PROPERTY(
float specularAmount READ specularAmount WRITE setSpecularAmount NOTIFY specularAmountChanged)
43 Q_PROPERTY(
float specularTint READ specularTint WRITE setSpecularTint NOTIFY specularTintChanged)
44 Q_PROPERTY(
bool specularSingleChannelEnabled READ specularSingleChannelEnabled WRITE setSpecularSingleChannelEnabled NOTIFY specularSingleChannelEnabledChanged REVISION(6, 8))
47 Q_PROPERTY(
float roughness READ roughness WRITE setRoughness NOTIFY roughnessChanged)
51 Q_PROPERTY(
QVector3D emissiveFactor READ emissiveFactor WRITE setEmissiveFactor NOTIFY emissiveFactorChanged)
53 Q_PROPERTY(
bool emissiveSingleChannelEnabled READ emissiveSingleChannelEnabled WRITE setEmissiveSingleChannelEnabled NOTIFY emissiveSingleChannelEnabledChanged REVISION(6, 8))
56 Q_PROPERTY(
bool invertOpacityMapValue READ invertOpacityMapValue WRITE setInvertOpacityMapValue NOTIFY invertOpacityMapValueChanged REVISION(6, 8))
57 Q_PROPERTY(
float opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
62 Q_PROPERTY(
float normalStrength READ normalStrength WRITE setNormalStrength NOTIFY normalStrengthChanged)
64 Q_PROPERTY(
QQuick3DTexture *specularReflectionMap READ specularReflectionMap WRITE setSpecularReflectionMap NOTIFY specularReflectionMapChanged)
68 Q_PROPERTY(
float occlusionAmount READ occlusionAmount WRITE setOcclusionAmount NOTIFY occlusionAmountChanged)
71 Q_PROPERTY(
float alphaCutoff READ alphaCutoff WRITE setAlphaCutoff NOTIFY alphaCutoffChanged)
73 Q_PROPERTY(
float pointSize READ pointSize WRITE setPointSize NOTIFY pointSizeChanged)
78 Q_PROPERTY(
float heightAmount READ heightAmount WRITE setHeightAmount NOTIFY heightAmountChanged REVISION(6, 2))
79 Q_PROPERTY(
int minHeightMapSamples READ minHeightMapSamples WRITE setMinHeightMapSamples NOTIFY minHeightMapSamplesChanged REVISION(6, 2))
80 Q_PROPERTY(
int maxHeightMapSamples READ maxHeightMapSamples WRITE setMaxHeightMapSamples NOTIFY maxHeightMapSamplesChanged REVISION(6, 2))
82 Q_PROPERTY(
float clearcoatAmount READ clearcoatAmount WRITE setClearcoatAmount NOTIFY clearcoatAmountChanged REVISION(6, 3))
85 clearcoatChannelChanged REVISION(6, 3))
86 Q_PROPERTY(
float clearcoatRoughnessAmount READ clearcoatRoughnessAmount WRITE setClearcoatRoughnessAmount NOTIFY
87 clearcoatRoughnessAmountChanged REVISION(6, 3))
89 setClearcoatRoughnessChannel NOTIFY clearcoatRoughnessChannelChanged REVISION(6, 3))
91 clearcoatRoughnessMapChanged REVISION(6, 3))
93 clearcoatNormalMapChanged REVISION(6, 3))
94 Q_PROPERTY(
float clearcoatNormalStrength READ clearcoatNormalStrength WRITE setClearcoatNormalStrength NOTIFY clearcoatNormalStrengthChanged REVISION(6, 8))
96 Q_PROPERTY(
float transmissionFactor READ transmissionFactor WRITE setTransmissionFactor NOTIFY transmissionFactorChanged)
100 Q_PROPERTY(
float thicknessFactor READ thicknessFactor WRITE setThicknessFactor NOTIFY thicknessFactorChanged REVISION(6, 3))
103 thicknessChannelChanged REVISION(6, 3))
104 Q_PROPERTY(
float attenuationDistance READ attenuationDistance WRITE setAttenuationDistance NOTIFY attenuationDistanceChanged REVISION(6, 3))
105 Q_PROPERTY(
QColor attenuationColor READ attenuationColor WRITE setAttenuationColor NOTIFY attenuationColorChanged REVISION(6, 3))
107 Q_PROPERTY(
float indexOfRefraction READ indexOfRefraction WRITE setIndexOfRefraction NOTIFY indexOfRefractionChanged REVISION(6, 3))
109 Q_PROPERTY(
bool vertexColorsEnabled READ vertexColorsEnabled WRITE setVertexColorsEnabled NOTIFY vertexColorsEnabledChanged REVISION(6, 5))
111 Q_PROPERTY(
bool fresnelScaleBiasEnabled READ fresnelScaleBiasEnabled WRITE setFresnelScaleBiasEnabled NOTIFY fresnelScaleBiasEnabledChanged REVISION(6, 8))
112 Q_PROPERTY(
float fresnelScale READ fresnelScale WRITE setFresnelScale NOTIFY fresnelScaleChanged REVISION(6, 8))
113 Q_PROPERTY(
float fresnelBias READ fresnelBias WRITE setFresnelBias NOTIFY fresnelBiasChanged REVISION(6, 8))
114 Q_PROPERTY(
float fresnelPower READ fresnelPower WRITE setFresnelPower NOTIFY fresnelPowerChanged REVISION(6, 8))
116 Q_PROPERTY(
bool clearcoatFresnelScaleBiasEnabled READ clearcoatFresnelScaleBiasEnabled WRITE setClearcoatFresnelScaleBiasEnabled NOTIFY clearcoatFresnelScaleBiasEnabledChanged REVISION(6, 8))
117 Q_PROPERTY(
float clearcoatFresnelScale READ clearcoatFresnelScale WRITE setClearcoatFresnelScale NOTIFY clearcoatFresnelScaleChanged REVISION(6, 8))
118 Q_PROPERTY(
float clearcoatFresnelBias READ clearcoatFresnelBias WRITE setClearcoatFresnelBias NOTIFY clearcoatFresnelBiasChanged REVISION(6, 8))
119 Q_PROPERTY(
float clearcoatFresnelPower READ clearcoatFresnelPower WRITE setClearcoatFresnelPower NOTIFY clearcoatFresnelPowerChanged REVISION(6, 8))
121 Q_PROPERTY(
bool vertexColorsMaskEnabled READ vertexColorsMaskEnabled WRITE setVertexColorsMaskEnabled NOTIFY vertexColorsMaskEnabledChanged REVISION(6, 8))
122 Q_PROPERTY(VertexColorMaskFlags vertexColorRedMask READ vertexColorRedMask WRITE setVertexColorRedMask NOTIFY vertexColorRedMaskChanged REVISION(6, 8))
123 Q_PROPERTY(VertexColorMaskFlags vertexColorGreenMask READ vertexColorGreenMask WRITE setVertexColorGreenMask NOTIFY vertexColorGreenMaskChanged REVISION(6, 8))
124 Q_PROPERTY(VertexColorMaskFlags vertexColorBlueMask READ vertexColorBlueMask WRITE setVertexColorBlueMask NOTIFY vertexColorBlueMaskChanged REVISION(6, 8))
125 Q_PROPERTY(VertexColorMaskFlags vertexColorAlphaMask READ vertexColorAlphaMask WRITE setVertexColorAlphaMask NOTIFY vertexColorAlphaMaskChanged REVISION(6, 8))
171 Lighting lighting()
const;
172 BlendMode blendMode()
const;
175 bool baseColorSingleChannelEnabled()
const;
176 TextureChannelMapping baseColorChannel()
const;
177 bool specularSingleChannelEnabled()
const;
178 TextureChannelMapping specularChannel()
const;
179 bool emissiveSingleChannelEnabled()
const;
180 TextureChannelMapping emissiveChannel()
const;
185 float specularTint()
const;
186 float specularAmount()
const;
187 float roughness()
const;
189 bool invertOpacityMapValue()
const;
190 float opacity()
const;
193 float metalness()
const;
195 float normalStrength()
const;
197 float occlusionAmount()
const;
198 AlphaMode alphaMode()
const;
199 float alphaCutoff()
const;
200 TextureChannelMapping metalnessChannel()
const;
201 TextureChannelMapping roughnessChannel()
const;
202 TextureChannelMapping opacityChannel()
const;
203 TextureChannelMapping occlusionChannel()
const;
204 float pointSize()
const;
205 float lineWidth()
const;
237 Q_REVISION(6, 8)
bool clearcoatFresnelScaleBiasEnabled() const;
246 Q_REVISION(6, 8) VertexColorMaskFlags vertexColorRedMask() const;
247 Q_REVISION(6, 8) VertexColorMaskFlags vertexColorGreenMask() const;
248 Q_REVISION(6, 8) VertexColorMaskFlags vertexColorBlueMask() const;
249 Q_REVISION(6, 8) VertexColorMaskFlags vertexColorAlphaMask() const;
254 void setBaseColor(
QColor baseColor);
256 void setBaseColorSingleChannelEnabled(
bool baseColorSingleChannelEnabled);
258 void setSpecularSingleChannelEnabled(
bool specularSingleChannelEnabled);
260 void setEmissiveSingleChannelEnabled(
bool emissiveSingleChannelEnabled);
263 void setEmissiveFactor(
QVector3D emissiveFactor);
266 void setSpecularTint(
float specularTint);
267 void setSpecularAmount(
float specularAmount);
268 void setRoughness(
float roughness);
270 void setInvertOpacityMapValue(
bool invertOpacityMapValue);
271 void setOpacity(
float opacity);
274 void setMetalness(
float metalnessAmount);
276 void setNormalStrength(
float normalStrength);
278 void setOcclusionAmount(
float occlusionAmount);
280 void setAlphaCutoff(
float alphaCutoff);
285 void setPointSize(
float size);
293 Q_REVISION(6, 3)
void setClearcoatAmount(
float newClearcoatAmount);
296 Q_REVISION(6, 3)
void setClearcoatRoughnessAmount(
float newClearcoatRoughnessAmount);
300 Q_REVISION(6, 8)
void setClearcoatNormalStrength(
float clearcoatNormalStrength);
302 Q_REVISION(6, 3)
void setTransmissionFactor(
float newTransmissionFactor);
306 Q_REVISION(6, 3)
void setThicknessFactor(
float newThicknessFactor);
309 Q_REVISION(6, 3)
void setAttenuationDistance(
float newAttenuationDistance);
312 Q_REVISION(6, 3)
void setIndexOfRefraction(
float indexOfRefraction);
313 Q_REVISION(6, 8)
void setFresnelScaleBiasEnabled(
bool fresnelScaleBias);
318 Q_REVISION(6, 8)
void setClearcoatFresnelScaleBiasEnabled(
bool clearcoatFresnelScaleBias);
319 Q_REVISION(6, 8)
void setClearcoatFresnelScale(
float clearcoatFresnelScale);
320 Q_REVISION(6, 8)
void setClearcoatFresnelBias(
float clearcoatFresnelBias);
321 Q_REVISION(6, 8)
void setClearcoatFresnelPower(
float clearcoatFresnelPower);
323 Q_REVISION(6, 5)
void setVertexColorsEnabled(
bool vertexColorsEnabled);
325 Q_REVISION(6, 8)
void setVertexColorsMaskEnabled(
bool vertexColorsMaskEnabled);
326 Q_REVISION(6, 8)
void setVertexColorRedMask(VertexColorMaskFlags vertexColorRedMask);
327 Q_REVISION(6, 8)
void setVertexColorGreenMask(VertexColorMaskFlags vertexColorGreenMask);
328 Q_REVISION(6, 8)
void setVertexColorBlueMask(VertexColorMaskFlags vertexColorBlueMask);
329 Q_REVISION(6, 8)
void setVertexColorAlphaMask(VertexColorMaskFlags vertexColorAlphaMask);
336 void baseColorSingleChannelEnabledChanged(
bool baseColorSingleChannelEnabled);
338 void specularSingleChannelEnabledChanged(
bool specularColorSingleChannelEnabled);
340 void emissiveSingleChannelEnabledChanged(
bool emissiveColorSingleChannelEnabled);
346 void specularTintChanged(
float specularTint);
347 void specularAmountChanged(
float specularAmount);
348 void roughnessChanged(
float roughness);
350 void invertOpacityMapValueChanged(
bool invertOpacityMapValue);
351 void opacityChanged(
float opacity);
354 void metalnessChanged(
float metalness);
356 void normalStrengthChanged(
float normalStrength);
358 void occlusionAmountChanged(
float occlusionAmount);
360 void alphaCutoffChanged(
float alphaCutoff);
365 void pointSizeChanged();
366 void lineWidthChanged();
369 Q_REVISION(6, 2)
void heightAmountChanged(
float heightAmount);
376 Q_REVISION(6, 3)
void clearcoatRoughnessAmountChanged(
float amount);
380 Q_REVISION(6, 8)
void clearcoatNormalStrengthChanged(
float clearcoatNormalStrength);
382 Q_REVISION(6, 3)
void transmissionFactorChanged(
float amount);
392 Q_REVISION(6, 3)
void indexOfRefractionChanged(
float indexOfRefraction);
393 Q_REVISION(6, 8)
void fresnelScaleBiasEnabledChanged(
bool fresnelScaleBiasEnabled);
394 Q_REVISION(6, 8)
void fresnelScaleChanged(
float fresnelScale);
396 Q_REVISION(6, 8)
void fresnelPowerChanged(
float fresnelPower);
398 Q_REVISION(6, 8)
void clearcoatFresnelScaleBiasEnabledChanged(
bool clearcoatFresnelScaleBiasEnabled);
399 Q_REVISION(6, 8)
void clearcoatFresnelScaleChanged(
float clearcoatFresnelScale);
400 Q_REVISION(6, 8)
void clearcoatFresnelBiasChanged(
float clearcoatFresnelBias);
401 Q_REVISION(6, 8)
void clearcoatFresnelPowerChanged(
float clearcoatFresnelPower);
403 Q_REVISION(6, 5)
void vertexColorsEnabledChanged(
bool vertexColorsEnabled);
413 void markAllDirty() override;
414 void itemChange(ItemChange, const ItemChangeData &) override;
417 LightingModeDirty = 0x00000001,
418 BlendModeDirty = 0x00000002,
419 BaseColorDirty = 0x00000004,
420 EmissiveDirty = 0x00000008,
421 SpecularDirty = 0x00000010,
422 OpacityDirty = 0x00000020,
423 NormalDirty = 0x00000040,
424 MetalnessDirty = 0x00000080,
425 RoughnessDirty = 0x00000100,
426 OcclusionDirty = 0x00000200,
427 AlphaModeDirty = 0x00000400,
428 PointSizeDirty = 0x00000800,
429 LineWidthDirty = 0x00001000,
430 HeightDirty = 0x00002000,
431 ClearcoatDirty = 0x00004000,
432 TransmissionDirty = 0x00008000,
433 VolumeDirty = 0x00010000,
434 VertexColorsDirty = 0x00020000
445 Lighting m_lighting = FragmentLighting;
446 BlendMode m_blendMode = SourceOver;
447 AlphaMode m_alphaMode =
Default;
450 bool m_baseColorSingleChannelEnabled =
false;
452 bool m_specularSingleChannelEnabled =
false;
455 bool m_emissiveSingleChannelEnabled =
false;
466 float m_specularTint = 0.0f;
467 float m_specularAmount = 1.0f;
468 float m_roughness = 0.0f;
469 bool m_invertOpacityMapValue =
false;
470 float m_opacity = 1.0f;
471 float m_metalnessAmount = 0.0f;
472 float m_normalStrength = 1.0f;
473 float m_occlusionAmount = 1.0f;
474 float m_alphaCutoff = 0.5f;
479 float m_pointSize = 1.0f;
480 float m_lineWidth = 1.0f;
483 float m_heightAmount = 0.0f;
484 int m_minHeightMapSamples = 8;
485 int m_maxHeightMapSamples = 32;
486 float m_clearcoatAmount = 0.0f;
489 float m_clearcoatRoughnessAmount = 0.0f;
490 float m_clearcoatNormalStrength = 1.0f;
494 float m_transmissionFactor = 0.0f;
497 float m_thicknessFactor = 0.0f;
500 float m_attenuationDistance = std::numeric_limits<float>::infinity();
502 float m_indexOfRefraction = 1.5f;
503 bool m_fresnelScaleBiasEnabled =
false;
504 float m_fresnelScale = 1.0f;
505 float m_fresnelBias = 0.0f;
506 float m_fresnelPower = 5.0f;
507 bool m_clearcoatFresnelScaleBiasEnabled =
false;
508 float m_clearcoatFresnelScale = 1.0f;
509 float m_clearcoatFresnelBias = 0.0f;
510 float m_clearcoatFresnelPower = 5.0f;
511 bool m_vertexColorsEnabled =
true;
513 bool m_vertexColorsMaskEnabled =
false;
514 VertexColorMaskFlags m_vertexColorRedMask = NoMask;
515 VertexColorMaskFlags m_vertexColorGreenMask = NoMask;
516 VertexColorMaskFlags m_vertexColorBlueMask = NoMask;
517 VertexColorMaskFlags m_vertexColorAlphaMask = NoMask;
519 quint32 m_dirtyAttributes = 0xffffffff;
520 void markDirty(DirtyType
type);
522 static constexpr float ensureNormalized(
float val) {
return qBound(0.0f,
val, 1.0f); }