|
@@ -214,11 +214,11 @@ public:
|
|
|
void SetShadowQuality(ShadowQuality quality);
|
|
void SetShadowQuality(ShadowQuality quality);
|
|
|
/// Set shadow softness, only works when SHADOWQUALITY_BLUR_VSM is used.
|
|
/// Set shadow softness, only works when SHADOWQUALITY_BLUR_VSM is used.
|
|
|
void SetShadowSoftness(float shadowSoftness);
|
|
void SetShadowSoftness(float shadowSoftness);
|
|
|
- /// Set shadow parameters when VSM is used, they help to reduce light bleeding. LightBleeding must be in [0, 1[
|
|
|
|
|
|
|
+ /// Set shadow parameters when VSM is used, they help to reduce light bleeding. LightBleeding must be in [0, 1].
|
|
|
void SetVSMShadowParameters(float minVariance, float lightBleedingReduction);
|
|
void SetVSMShadowParameters(float minVariance, float lightBleedingReduction);
|
|
|
- /// Set VSM shadow map multisampling level. Default 1 (no multisampling.)
|
|
|
|
|
|
|
+ /// Set VSM shadow map multisampling level. Default 1 (no multisampling).
|
|
|
void SetVSMMultiSample(int multiSample);
|
|
void SetVSMMultiSample(int multiSample);
|
|
|
- /// Set post processing filter to the shadow map
|
|
|
|
|
|
|
+ /// Set post processing filter to the shadow map.
|
|
|
void SetShadowMapFilter(Object* instance, ShadowMapFilter functionPtr);
|
|
void SetShadowMapFilter(Object* instance, ShadowMapFilter functionPtr);
|
|
|
/// Set reuse of shadow maps. Default is true. If disabled, also transparent geometry can be shadowed.
|
|
/// Set reuse of shadow maps. Default is true. If disabled, also transparent geometry can be shadowed.
|
|
|
void SetReuseShadowMaps(bool enable);
|
|
void SetReuseShadowMaps(bool enable);
|
|
@@ -240,11 +240,11 @@ public:
|
|
|
void SetOccluderSizeThreshold(float screenSize);
|
|
void SetOccluderSizeThreshold(float screenSize);
|
|
|
/// Set whether to thread occluder rendering. Default false.
|
|
/// Set whether to thread occluder rendering. Default false.
|
|
|
void SetThreadedOcclusion(bool enable);
|
|
void SetThreadedOcclusion(bool enable);
|
|
|
- /// Set shadow depth bias multiplier for mobile platforms to counteract possible worse shadow map precision. Default 1.0 (no effect.)
|
|
|
|
|
|
|
+ /// Set shadow depth bias multiplier for mobile platforms to counteract possible worse shadow map precision. Default 1.0 (no effect).
|
|
|
void SetMobileShadowBiasMul(float mul);
|
|
void SetMobileShadowBiasMul(float mul);
|
|
|
- /// Set shadow depth bias addition for mobile platforms to counteract possible worse shadow map precision. Default 0.0 (no effect.)
|
|
|
|
|
|
|
+ /// Set shadow depth bias addition for mobile platforms to counteract possible worse shadow map precision. Default 0.0 (no effect).
|
|
|
void SetMobileShadowBiasAdd(float add);
|
|
void SetMobileShadowBiasAdd(float add);
|
|
|
- /// Set shadow normal offset multiplier for mobile platforms to counteract possible worse shadow map precision. Default 1.0 (no effect.)
|
|
|
|
|
|
|
+ /// Set shadow normal offset multiplier for mobile platforms to counteract possible worse shadow map precision. Default 1.0 (no effect).
|
|
|
void SetMobileNormalOffsetMul(float mul);
|
|
void SetMobileNormalOffsetMul(float mul);
|
|
|
/// Force reload of shaders.
|
|
/// Force reload of shaders.
|
|
|
void ReloadShaders();
|
|
void ReloadShaders();
|
|
@@ -375,7 +375,7 @@ public:
|
|
|
/// Return the shadowed pointlight indirection cube map.
|
|
/// Return the shadowed pointlight indirection cube map.
|
|
|
TextureCube* GetIndirectionCubeMap() const { return indirectionCubeMap_; }
|
|
TextureCube* GetIndirectionCubeMap() const { return indirectionCubeMap_; }
|
|
|
|
|
|
|
|
- /// Return the instancing vertex buffer
|
|
|
|
|
|
|
+ /// Return the instancing vertex buffer.
|
|
|
VertexBuffer* GetInstancingBuffer() const { return dynamicInstancing_ ? instancingBuffer_.Get() : nullptr; }
|
|
VertexBuffer* GetInstancingBuffer() const { return dynamicInstancing_ ? instancingBuffer_.Get() : nullptr; }
|
|
|
|
|
|
|
|
/// Return the frame update parameters.
|
|
/// Return the frame update parameters.
|
|
@@ -461,7 +461,7 @@ private:
|
|
|
void ResetShadowMaps();
|
|
void ResetShadowMaps();
|
|
|
/// Remove all occlusion and screen buffers.
|
|
/// Remove all occlusion and screen buffers.
|
|
|
void ResetBuffers();
|
|
void ResetBuffers();
|
|
|
- /// Find variations for shadow shaders
|
|
|
|
|
|
|
+ /// Find variations for shadow shaders.
|
|
|
String GetShadowVariations() const;
|
|
String GetShadowVariations() const;
|
|
|
/// Handle screen mode event.
|
|
/// Handle screen mode event.
|
|
|
void HandleScreenMode(StringHash eventType, VariantMap& eventData);
|
|
void HandleScreenMode(StringHash eventType, VariantMap& eventData);
|
|
@@ -506,9 +506,9 @@ private:
|
|
|
HashMap<int, SharedPtr<Texture2D> > colorShadowMaps_;
|
|
HashMap<int, SharedPtr<Texture2D> > colorShadowMaps_;
|
|
|
/// Shadow map allocations by resolution.
|
|
/// Shadow map allocations by resolution.
|
|
|
HashMap<int, PODVector<Light*> > shadowMapAllocations_;
|
|
HashMap<int, PODVector<Light*> > shadowMapAllocations_;
|
|
|
- /// Instance of shadow map filter
|
|
|
|
|
|
|
+ /// Instance of shadow map filter.
|
|
|
Object* shadowMapFilterInstance_{};
|
|
Object* shadowMapFilterInstance_{};
|
|
|
- /// Function pointer of shadow map filter
|
|
|
|
|
|
|
+ /// Function pointer of shadow map filter.
|
|
|
ShadowMapFilter shadowMapFilter_{};
|
|
ShadowMapFilter shadowMapFilter_{};
|
|
|
/// Screen buffers by resolution and format.
|
|
/// Screen buffers by resolution and format.
|
|
|
HashMap<unsigned long long, Vector<SharedPtr<Texture> > > screenBuffers_;
|
|
HashMap<unsigned long long, Vector<SharedPtr<Texture> > > screenBuffers_;
|
|
@@ -574,9 +574,9 @@ private:
|
|
|
unsigned numOcclusionBuffers_{};
|
|
unsigned numOcclusionBuffers_{};
|
|
|
/// Number of temporary shadow cameras in use.
|
|
/// Number of temporary shadow cameras in use.
|
|
|
unsigned numShadowCameras_{};
|
|
unsigned numShadowCameras_{};
|
|
|
- /// Number of primitives (3D geometry only.)
|
|
|
|
|
|
|
+ /// Number of primitives (3D geometry only).
|
|
|
unsigned numPrimitives_{};
|
|
unsigned numPrimitives_{};
|
|
|
- /// Number of batches (3D geometry only.)
|
|
|
|
|
|
|
+ /// Number of batches (3D geometry only).
|
|
|
unsigned numBatches_{};
|
|
unsigned numBatches_{};
|
|
|
/// Frame number on which shaders last changed.
|
|
/// Frame number on which shaders last changed.
|
|
|
unsigned shadersChangedFrameNumber_{M_MAX_UNSIGNED};
|
|
unsigned shadersChangedFrameNumber_{M_MAX_UNSIGNED};
|