Encapsulate a light object that is able to cast shadows in a Qt 3D scene. More...
Header: | #include <Kuesa/ShadowCastingLight> |
Since: | Kuesa 1.3 |
Instantiated By: | ShadowCastingLight |
Inherited By: |
This class was introduced in Kuesa 1.3.
|
|
bool | castsShadows() const |
float | nearPlane() const |
float | shadowMapBias() const |
bool | softShadows() const |
QSize | textureSize() const |
void | setCastsShadows(bool castsShadows) |
void | setNearPlane(float nearPlane) |
void | setShadowMapBias(float bias) |
void | setSoftShadows(bool softShadows) |
void | setTextureSize(const QSize &textureSize) |
void | biasChanged(float bias) |
void | castsShadowsChanged(bool castsShadows) |
void | nearPlaneChanged(float nearPlane) |
void | softShadowsChanged(bool softShadows) |
void | textureSizeChanged(const QSize &textureSize) |
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.
Access functions:
bool | castsShadows() const |
void | setCastsShadows(bool castsShadows) |
Notifier signal:
void | castsShadowsChanged(bool castsShadows) |
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"
Access functions:
float | nearPlane() const |
void | setNearPlane(float nearPlane) |
Notifier signal:
void | nearPlaneChanged(float nearPlane) |
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.
Access functions:
float | shadowMapBias() const |
void | setShadowMapBias(float bias) |
Notifier signal:
void | biasChanged(float bias) |
Determines whether shadow edges are soft or hard. Soft shadows look more realistic but can impact rendering performance
Access functions:
bool | softShadows() const |
void | setSoftShadows(bool softShadows) |
Notifier signal:
void | softShadowsChanged(bool softShadows) |
Specifies the size of the texture to use for the shadowmap. Larger textures result in higher quality shadows
Access functions:
QSize | textureSize() const |
void | setTextureSize(const QSize &textureSize) |
Notifier signal:
void | textureSizeChanged(const QSize &textureSize) |