diff --git a/hrt/prefab/rfx/VolumetricLighting.hx b/hrt/prefab/rfx/VolumetricLighting.hx index cefb815c..f8f38746 100644 --- a/hrt/prefab/rfx/VolumetricLighting.hx +++ b/hrt/prefab/rfx/VolumetricLighting.hx @@ -220,6 +220,7 @@ class VolumetricLighting extends RendererFX { @:s public var color : Int = 0xFFFFFF; @:s public var steps : Int = 10; @:s public var blur : Float = 0.0; + @:s public var blurDepthThreshold : Float = 10.0; @:s public var startDistance : Float = 0.0; @:s public var endDistance : Float = 200.0; @:s public var distanceOpacity : Float = 1.0; @@ -326,7 +327,7 @@ class VolumetricLighting extends RendererFX { blurPass.shader.isDepthDependant = true; blurPass.shader.depthTexture = halfDepth; blurPass.shader.inverseProj = inverseProj; - blurPass.shader.depthThreshold = 10; + blurPass.shader.depthThreshold = blurDepthThreshold; blurPass.apply(r.ctx, tex); var b : h3d.mat.BlendMode = switch ( blend ) { @@ -355,10 +356,10 @@ class VolumetricLighting extends RendererFX { if ( !AFTER_FX ) execute(r, step); } - + override function end(r:h3d.scene.Renderer, step:h3d.impl.RendererFX.Step) { if ( AFTER_FX ) - execute(r, step); + execute(r, step); } function makeNoiseTex() : h3d.mat.Texture { @@ -441,6 +442,7 @@ class VolumetricLighting extends RendererFX {
Steps
Blur
+
Blur depth threshold
Dithering intensity