Blurry shader/effect?

Post Reply
User avatar
AiTechEye
Member
Posts: 818
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Blurry shader/effect?

by AiTechEye » Post

Image
Image

is it possible?
Attachments
screenshot_20200524_210526.png
(425.74 KiB) Not downloaded yet
screenshot_20200524_210000.png
(341.54 KiB) Not downloaded yet

User avatar
runs
Member
Posts: 1729
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Blurry shader/effect?

by runs » Post

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
Day 42 of the quarantine

User avatar
LMD
Member
Posts: 908
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Blurry shader/effect?

by LMD » Post

It is possible using my second rendering stage PR and altering the shaders. My shader media PR might be interesting in that regard.
My stuff: Projects - Mods - Website

User avatar
runs
Member
Posts: 1729
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Blurry shader/effect?

by runs » Post

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.
Day 42 of the quarantine

CalebJ
Member
Posts: 312
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Blurry shader/effect?

by CalebJ » Post

I'd like to see a feature like this available too. I wish, though, that issue #7284 would finally get some love :)
If you want realism, you're in the wrong place. Get off your mobile.

User avatar
Hybrid Dog
Member
Posts: 2761
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Blurry shader/effect?

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
v-rob
Member
Posts: 752
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
Location: Right behind you.

Re: Blurry shader/effect?

by v-rob » Post

I personally wish for a way to blur a specific rectangle on the screen as well as the whole screen.

User avatar
sorcerykid
Member
Posts: 1342
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Blurry shader/effect?

by sorcerykid » Post

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.

User avatar
v-rob
Member
Posts: 752
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
Location: Right behind you.

Re: Blurry shader/effect?

by v-rob » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests