Kuesa::Qt3D::ShadowCastingLight
Module: Kuesa Qt 3D API
Encapsulate a light object that is able to cast shadows in a Qt 3D scene. More...
#include <Kuesa/Qt3D/api/lights/shadowcastinglight.h>
Inherits from Qt3DRender::QAbstractLight
Inherited by Kuesa::Qt3D::DirectionalLight, Kuesa::Qt3D::PointLight, Kuesa::Qt3D::SpotLight
Public Slots
Public Signals
Public Functions
Protected Functions
|
Name |
|
ShadowCastingLight(ShadowCastingLightPrivate & dd, Qt3DCore::QNode * parent =nullptr) |
Public Properties
Detailed Description
| class Kuesa::Qt3D::ShadowCastingLight;
|
Encapsulate a light object that is able to cast shadows in a Qt 3D scene.
Since: Kuesa 2.0
Shadow are currently only supported with Qt3D running with the OpenGL backend which supports geometry shaders when running on devices supporting OpenGL 3.2 or OpenGL ES 3.2. When Qt3D is using the Qt RHI (rendering abstraction interface) backend. shadows are not supported due to the lack of geometry shader support in RHI.
Public Slots Documentation
slot setCastsShadows
| void setCastsShadows(
bool castsShadows
)
|
slot setLightViewProjectionMatrix
| void setLightViewProjectionMatrix(
const QMatrix4x4 & matrix
)
|
slot setTextureSize
| void setTextureSize(
const QSize & textureSize
)
|
slot setShadowMapBias
| void setShadowMapBias(
float bias
)
|
slot setNearPlane
| void setNearPlane(
float nearPlane
)
|
slot setSoftShadows
| void setSoftShadows(
bool softShadows
)
|
slot setLightIndex
| void setLightIndex(
int index
)
|
slot setNearFarPlanes
| void setNearFarPlanes(
float near,
float far
)
|
Public Signals Documentation
signal castsShadowsChanged
| void castsShadowsChanged(
bool castsShadows
)
|
signal textureSizeChanged
| void textureSizeChanged(
const QSize & textureSize
)
|
signal depthTextureChanged
| void depthTextureChanged(
Qt3DRender::QAbstractTexture * depthTexture
)
|
signal biasChanged
| void biasChanged(
float bias
)
|
signal nearPlaneChanged
| void nearPlaneChanged(
float nearPlane
)
|
signal softShadowsChanged
| void softShadowsChanged(
bool softShadows
)
|
Public Functions Documentation
function ~ShadowCastingLight
function castsShadows
| bool castsShadows() const
|
function textureSize
| QSize textureSize() const
|
function shadowMapBias
| float shadowMapBias() const
|
function nearPlane
function softShadows
Protected Functions Documentation
function ShadowCastingLight
| explicit ShadowCastingLight(
ShadowCastingLightPrivate & dd,
Qt3DCore::QNode * parent =nullptr
)
|
Public Property Documentation
property castsShadows
Encapsulate a light object that is able to cast shadows in a Qt 3D scene.
Since: Kuesa 2.0
Shadow are currently only supported with Qt3D running with the OpenGL backend which supports geometry shaders when running on devices supporting OpenGL 3.2 or OpenGL ES 3.2. When Qt3D is using the Qt RHI (rendering abstraction interface) backend. shadows are not supported due to the lack of geometry shader support in RHI.
Specifies whether or not the light casts shadows.
property softShadows
Determines whether shadow edges are soft or hard. Soft shadows look more realistic but can impact rendering performance
property textureSize
Specifies the size of the texture to use for the shadowmap. Larger textures result in higher quality shadows
property shadowMapBias
Holds the amount to offset the shadow map perpendicular to the surface when checking whether a surface is in shadow. This helps eliminate self-shadowing and "shadow-acne". Larger values reduce these effects but if the value is too large, objects can appear to float above their shadows.
property nearPlane
Holds the distance from the light at which it should begin casting shadows. Setting this as large as possible while still including all shadow-casting objects will increase the precision of the shadowMap depth texture, reducing self-shadowing and "shadow-acne"
Updated on 2023-07-03 at 11:02:11 +0000