hyprshade icon indicating copy to clipboard operation
hyprshade copied to clipboard

Add the gradual_shift_duration option to shaders while blocking execution

Open guillaumeboehm opened this issue 3 months ago • 2 comments

Same feature as https://github.com/loqusion/hyprshade/pull/29, different implementation.

This PR adds the gradual_shift_duration option to shaders in hyprshade.toml.

With the option set, hyprshade on will block execution for the time set in gradual_shift_duration and gradually set the shader while increasing the gradualPercentage glsl variable.

If the concerned shader is not a template or does not implement the gradualPercentage variable, gradual_shift_duration will have no effect.

guillaumeboehm avatar Apr 02 '24 16:04 guillaumeboehm

With the recent changes I ended up using the [shaders.config] for the shader to fetch the gradual_shift_duration. But it feels somewhat hacky I think, because it's not a variable that is directly passed to the shader... But I suppose you didn't want the shader to have the whole config for no reason?

guillaumeboehm avatar Apr 19 '24 09:04 guillaumeboehm

Implemented it with an normal config and not a shader variable, it does feel hacky though... Not having the full config in the shader ends up making it a bit annoying.

guillaumeboehm avatar Apr 19 '24 11:04 guillaumeboehm