feature: Added uncapped_independence toggle
This commit is contained in:
parent
f0abcd0d0f
commit
9e4caef0dd
2 changed files with 14 additions and 3 deletions
|
|
@ -102,6 +102,7 @@ backtracking_velocity_match_parallel_sensitivity = 0.5
|
||||||
backtracking_velcoity_match_perpendicular_sensitivity = 0.1
|
backtracking_velcoity_match_perpendicular_sensitivity = 0.1
|
||||||
JFA_pass_count = 3
|
JFA_pass_count = 3
|
||||||
framerate_independent = true
|
framerate_independent = true
|
||||||
|
uncapped_independence = false
|
||||||
target_constant_framerate = 30.0
|
target_constant_framerate = 30.0
|
||||||
|
|
||||||
[sub_resource type="Compositor" id="Compositor_ak7ke"]
|
[sub_resource type="Compositor" id="Compositor_ak7ke"]
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,14 @@ class_name MotionBlurSphynxJumpFlood
|
||||||
## target_constant_framerate
|
## target_constant_framerate
|
||||||
@export var framerate_independent : bool = true
|
@export var framerate_independent : bool = true
|
||||||
|
|
||||||
|
## Description: Removes clamping on motion blur scale to allow framerate independent motion
|
||||||
|
## blur to scale longer than realistically possible when render framerate is higher
|
||||||
|
## than target framerate.[br][br]
|
||||||
|
## [color=yellow]Warning:[/color] Turning this on would allow over-blurring of pixels, which
|
||||||
|
## produces inaccurate results, and would likely cause nausea in players over
|
||||||
|
## long exposure durations, use with caution and out of artistic intent
|
||||||
|
@export var uncapped_independence : bool = false
|
||||||
|
|
||||||
## if framerate_independent is enabled, the blur would simulate
|
## if framerate_independent is enabled, the blur would simulate
|
||||||
## sutter speeds at that framerate, and up.
|
## sutter speeds at that framerate, and up.
|
||||||
@export var target_constant_framerate : float = 30
|
@export var target_constant_framerate : float = 30
|
||||||
|
|
@ -138,8 +146,6 @@ func get_sampler_uniform(image: RID, binding: int) -> RDUniform:
|
||||||
uniform.add_id(image)
|
uniform.add_id(image)
|
||||||
return uniform
|
return uniform
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var temp_motion_blur_intensity : float
|
var temp_motion_blur_intensity : float
|
||||||
|
|
||||||
var previous_time : float = 0
|
var previous_time : float = 0
|
||||||
|
|
@ -154,7 +160,11 @@ func _render_callback(p_effect_callback_type, p_render_data):
|
||||||
temp_motion_blur_intensity = motion_blur_intensity
|
temp_motion_blur_intensity = motion_blur_intensity
|
||||||
|
|
||||||
if framerate_independent:
|
if framerate_independent:
|
||||||
var capped_frame_time : float = min(1 / target_constant_framerate, delta_time)
|
var capped_frame_time : float = 1 / target_constant_framerate
|
||||||
|
|
||||||
|
if !uncapped_independence:
|
||||||
|
capped_frame_time = min(capped_frame_time, delta_time)
|
||||||
|
|
||||||
temp_motion_blur_intensity = motion_blur_intensity * capped_frame_time / delta_time
|
temp_motion_blur_intensity = motion_blur_intensity * capped_frame_time / delta_time
|
||||||
|
|
||||||
if rd and p_effect_callback_type == CompositorEffect.EFFECT_CALLBACK_TYPE_POST_TRANSPARENT:
|
if rd and p_effect_callback_type == CompositorEffect.EFFECT_CALLBACK_TYPE_POST_TRANSPARENT:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue