Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dspecularglossymaterial.cpp File Reference
#include "qquick3dspecularglossymaterial_p.h"
#include "qquick3dobject_p.h"
#include <QtQuick3DRuntimeRender/private/qssgrenderdefaultmaterial_p.h>
#include <QtQuick3DUtils/private/qssgutils_p.h>
#include <QtQuick3D/private/qquick3dviewport_p.h>
+ Include dependency graph for qquick3dspecularglossymaterial.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE float ensureNormalized (float val)
 \qmltype SpecularGlossyMaterial \inherits Material \inqmlmodule QtQuick3D
 

Function Documentation

◆ ensureNormalized()

static QT_BEGIN_NAMESPACE float ensureNormalized ( float  val)
inlinestatic

\qmltype SpecularGlossyMaterial \inherits Material \inqmlmodule QtQuick3D

Lets you define a material for 3D items using the specular/glossiness workflow.

Before a Model can be rendered in a scene, it must have at least one material attached to it that describes how the mesh should be shaded. The SpecularGlossyMaterial is a PBR specular/glossiness material that aims at being an easy to use material with a minimal set of parameters. In addition to having few parameters, all input values are strictly normalized between 0 and 1 and have sensible defaults, meaning even without changing any values, the material can be used to shader a model. For an introduction on how the different properties of the SpecularGlossyMaterial affects how a model is shaded, see the \l{Qt Quick 3D - Principled Material Example}{Principled Material example} which provides a mode for using the Specular/Glossy workflow.

Alternatively to use the metallic/roughness workflow instead use \l {PrincipledMaterial}.

Definition at line 587 of file qquick3dspecularglossymaterial.cpp.

References qBound().

+ Here is the call graph for this function: