Page 1 of 1

Blurry shader/effect?

Posted: Sun May 24, 2020 19:19
by AiTechEye
Image
Image

is it possible?

Re: Blurry shader/effect?

Posted: Sun May 24, 2020 23:15
by runs
I believe that no, but there is a trick.

Do a hud (entire screen) with a semi-transparent white glass texture. An example.

I did a blood screen vision effect for my lycantropy-petz:

Code: Select all

function petz.show_werewolf_vignette(player)
	local hud_id = player:hud_add({
		hud_elem_type = "image",
		text = "petz_werewolf_vignette.png",
		position = {x=0, y=0},
		scale = {x=-100, y=-100},
		alignment = {x=1, y=1},
		offset = {x=0, y=0}
	})
	local meta = player:get_meta()
	meta:set_int("petz:werewolf_vignette_id", hud_id)
end

function petz.remove_werewolf_vignette(player)
	local meta = player:get_meta()
	local hud_id = meta:get_int("petz:werewolf_vignette_id")
	if hud_id then
		player:hud_remove(hud_id)
	end
end

Re: Blurry shader/effect?

Posted: Thu May 28, 2020 18:58
by LMD
It is possible using my second rendering stage PR and altering the shaders. My shader media PR might be interesting in that regard.

Re: Blurry shader/effect?

Posted: Thu May 28, 2020 22:38
by runs
LMD wrote:
Thu May 28, 2020 18:58
It is possible using my second rendering stage PR and altering the shaders. My shader media PR might be interesting in that regard.
Yeah, great addition if it finally comes to fruition, but given the comments, people are already starting to criticize.

The shaders support all minimally advanced games.

Why does Minetest have to get stuck in backwards graphics?

That if it can cause failures on games/servers, ha, of course! but it will be a matter of users not to try those shaders.

Fear should not be an excuse to move forward.

Re: Blurry shader/effect?

Posted: Thu May 28, 2020 23:12
by CalebJ
I'd like to see a feature like this available too. I wish, though, that issue #7284 would finally get some love :)

Re: Blurry shader/effect?

Posted: Thu Jul 09, 2020 18:38
by Hybrid Dog
Instead of simply making the image blurry, Minetest could render in a lower resolution and then upscale it with a blurring filter. This would improve the performance as a side effect to the blurring.

Re: Blurry shader/effect?

Posted: Thu Jul 09, 2020 19:17
by v-rob
I personally wish for a way to blur a specific rectangle on the screen as well as the whole screen.

Re: Blurry shader/effect?

Posted: Mon Jul 27, 2020 00:39
by sorcerykid
It would also be cool if the blurring intensity was proportional to the distance from the camera, to give a telephoto lens effect. But honestly, I'd be happy with any type of blur filter at this point.

Re: Blurry shader/effect?

Posted: Mon Jul 27, 2020 01:29
by v-rob
Anyone good with shaders? This sounds like an easy one to make. I tried making a Gaussian blur filter using pure C++, but a) I couldn't get it to work (although I admittantly didn't try very hard) and b) I doubt the developers would like such a thing on the CPU side, but I really don't know.