47 void setUseMetalness(
const bool value) { _useMetalness = value; _dirtyShader =
true; }
52 float gloss()
const {
return _gloss; }
53 void setGloss(
const float value) { _gloss = value; }
74 float opacity()
const {
return _opacity; }
87 void setAnisotropy(
const float value) { _anisotropy = value; _dirtyShader =
true; }
139 void setUseFog(
const bool value) { _useFog = value; _dirtyShader =
true; }
141 void setUseLighting(
const bool value) { _useLighting = value; _dirtyShader =
true; }
143 void setUseSkybox(
const bool value) { _useSkybox = value; _dirtyShader =
true; }
157 void setClearCoat(
const float value) { _clearCoat = value; _dirtyShader =
true; }
225 void setUseOrenNayar(
const bool value) { _useOrenNayar = value; _dirtyShader =
true; }
236 Color _diffuse =
Color(1.0f, 1.0f, 1.0f, 1.0f);
237 Texture* _diffuseMap =
nullptr;
239 Color _specular =
Color(0.0f, 0.0f, 0.0f, 1.0f);
241 float _metalness = 0.0f;
242 bool _useMetalness =
true;
243 Texture* _metalnessMap =
nullptr;
245 float _gloss = 0.25f;
246 bool _glossInvert =
false;
249 Color _emissive =
Color(0.0f, 0.0f, 0.0f, 1.0f);
250 float _emissiveIntensity = 1.0f;
251 Texture* _emissiveMap =
nullptr;
254 float _bumpiness = 1.0f;
256 float _opacity = 1.0f;
257 Texture* _opacityMap =
nullptr;
260 float _heightMapFactor = 0.05f;
262 float _anisotropy = 0.0f;
264 float _transmissionFactor = 0.0f;
265 float _refractionIndex = 1.5f;
266 float _thickness = 0.0f;
271 Vector2 _diffuseMapTiling{1.0f, 1.0f};
272 Vector2 _diffuseMapOffset{0.0f, 0.0f};
273 float _diffuseMapRotation = 0.0f;
275 Vector2 _normalMapTiling{1.0f, 1.0f};
276 Vector2 _normalMapOffset{0.0f, 0.0f};
277 float _normalMapRotation = 0.0f;
279 Vector2 _metalnessMapTiling{1.0f, 1.0f};
280 Vector2 _metalnessMapOffset{0.0f, 0.0f};
281 float _metalnessMapRotation = 0.0f;
283 Vector2 _aoMapTiling{1.0f, 1.0f};
284 Vector2 _aoMapOffset{0.0f, 0.0f};
285 float _aoMapRotation = 0.0f;
287 Vector2 _emissiveMapTiling{1.0f, 1.0f};
288 Vector2 _emissiveMapOffset{0.0f, 0.0f};
289 float _emissiveMapRotation = 0.0f;
291 Texture* _reflectionMap =
nullptr;
294 float _clearCoat = 0.0f;
295 float _clearCoatGloss = 1.0f;
296 bool _clearCoatGlossInvert =
false;
297 float _clearCoatBumpiness = 1.0f;
298 Texture* _clearCoatMap =
nullptr;
299 Texture* _clearCoatGlossMap =
nullptr;
300 Texture* _clearCoatNormalMap =
nullptr;
303 Color _sheenColor = Color(0.0f, 0.0f, 0.0f, 1.0f);
304 float _sheenRoughness = 0.0f;
305 Texture* _sheenMap =
nullptr;
308 float _iridescenceIntensity = 0.0f;
309 float _iridescenceIOR = 1.3f;
310 float _iridescenceThicknessMin = 100.0f;
311 float _iridescenceThicknessMax = 400.0f;
312 Texture* _iridescenceMap =
nullptr;
313 Texture* _iridescenceThicknessMap =
nullptr;
316 Color _specularColor = Color(1.0f, 1.0f, 1.0f, 1.0f);
317 float _glossiness = 1.0f;
318 Texture* _specGlossMap =
nullptr;
321 float _detailNormalScale = 1.0f;
322 Texture* _detailNormalMap =
nullptr;
323 TextureTransform _detailNormalTransform;
326 float _displacementScale = 0.0f;
327 float _displacementBias = 0.5f;
328 Texture* _displacementMap =
nullptr;
331 bool _useOrenNayar =
false;
334 bool _useLighting =
true;
335 bool _useSkybox =
true;
336 bool _twoSidedLighting =
false;
337 bool _shadowCatcher =
false;
339 mutable bool _dirtyShader =
true;
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.