Page 3 of 5

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Tue Jan 01, 2019 7:14 pm
by Pixel Eater
Beezle wrote:Hey Pixel Eater, normally I dislike motion blur in 1st person shooters but with the right settings, it actually works pretty well. I think you did a decent job here implementing it and the settings for it. By default its just a tad too much, but my personal settings are Samples - 5, Strength - 40 or 48, Recovery - on the default 64, and Blend - Lighten. I'd recommend these settings to anyone using this. Thanks Pixel Eater!
Thanks Beezle! In that case I'll make the default strength 44 for the next release :thumb:

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Tue Jan 01, 2019 7:31 pm
by Zemakat
Pixel Eater wrote:
Remaker wrote:Yup, it goes away when it's off. However, another glitch with the new version is that normal mode makes everything look white. Unlike the black screen glitch, it doesn't intrude the status bar or the player weapon sprite, it just simply leaves the rest of my vision white, like as if the map is only a white void.
Thanks for keeping me up to date Remaker. Unfortunately it really seems like it's due to a bigger issue than the shader itself- it's defined as 'beforebloom' which means it can only affect what's behind the player sprite. If the glitch is happening in front of the status bar it's either hardware or something happening within GZDoom itself. That said, try this one and see if anything improves:
MBlur1.03x.pk3
I've marked it "x" as it's a regression because it gets the screen height within the shader itself rather than from zscript.
Just wanted to say I tried it out. Seems like the "white void" glitch still occurs. Since it might be hardware, I guess there isn't much else that could be done.

But even with that, thanks for everything, because I appreciate your efforts. =:)

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Tue Jan 01, 2019 8:07 pm
by Pixel Eater
Thanks for bug testing and sorry I wasn't able to help :(

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Thu Jan 03, 2019 12:23 pm
by Beezle
Pixel Eater wrote:
Beezle wrote:Hey Pixel Eater, normally I dislike motion blur in 1st person shooters but with the right settings, it actually works pretty well. I think you did a decent job here implementing it and the settings for it. By default its just a tad too much, but my personal settings are Samples - 5, Strength - 40 or 48, Recovery - on the default 64, and Blend - Lighten. I'd recommend these settings to anyone using this. Thanks Pixel Eater!
Thanks Beezle! In that case I'll make the default strength 44 for the next release :thumb:
You know what, I actually find Strength - 48 to be better but I honestly think default setting are perfectly fine the way you had them. I've only seen 2 other mods with Motion Blur built in and they had the default settings right where you did. It's a good place to start and I'd imagine most people wouldn't need to tweak them much from there, thank you though. :D

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Tue Apr 30, 2019 8:14 am
by _mental_
Finally I found the source of this motion blur shader used in several mods.

I'm not a fan of motion blur effect but it's irrelevant if I can disable it.
However, using integrated Intel graphics I'm seeing something like this.
Screenshot_Doom_20190430_164927.png
It's the starting location of Doom 2 MAP01 which is obvious I guess :lol:
Depending on the current phase of the moon it's sometimes impossible to read anything in menu and console.

Here is a whole shader, the comment is mine.

Code: Select all

void main()
{
	vec4 C	;  // <-- no initialization, should be something like: vec4 C = vec4(.0, .0, .0, 1.);
	int i ;
	
	if( blendmode == 1 )
	{
		for( i = 0; i < samples; i++ )
		{
			C.rgb += max( C.rgb, texture( InputTexture, TexCoord + steps * i ).rgb ) * increment ;
		}
	}
	else
	{
		for( i = 0; i < samples; i++ )
		{
			C.rgb += texture( InputTexture, TexCoord + steps * i ).rgb * increment ;
		}
	}
	
	FragColor = C ;
}
OpenGL Shading Language spec wrote:Reading a variable before writing (or initializing) it is legal, however the value is undefined.
The shader will work only if uninitialized variables are set to zeroes. If driver doesn't do this (and it shouldn't according to the spec), the result will be random.
Both branches read C.rgb without writing to it previously. Could you please fix this?

Re: Simple Motion Blur 1.03a - Faster recovery

Posted: Wed May 01, 2019 6:48 pm
by Pixel Eater
_mental_ wrote:The shader will work only if uninitialized variables are set to zeroes. If driver doesn't do this (and it shouldn't according to the spec), the result will be random.
Both branches read C.rgb without writing to it previously. Could you please fix this?
Thanks for figuring this out _mental_, hopefully it will also solve what Remaker was seeing :)

It's a quick fix but I'll try and squeeze some tweaks into the same update first.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Fri May 03, 2019 8:34 am
by Pixel Eater
Should be okay now, thanks again for the heads up.

There's some new stuff added, mainly the dynamic sample option which speeds things up considerably (at least for me). People may want to increase the sample amount in combination with it in order to actually see a difference though- but it's worth it.
Also the shader responds to the player's velocity now so that strafing and jumping etc. will blur if wanted. Finding a level with a death drop can be fun too.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Fri May 03, 2019 2:39 pm
by Caligari87
Yay new version! Hopefully this fixed my Vulkan bug too, which was very similar to the one described above. Since I can't try it for several hours: Does it apply "zoom" blurring to forward and backward motion as well? Or just horizontal/vertical?

8-)

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Fri May 03, 2019 4:09 pm
by Pixel Eater
I hope so- kudos to _mental_ for that :D

It doesn't do zoom so far (And I think it would look bad without depth buffer access anyway). It does use forward/backward movement to blur the floor and ceiling the further you look up or down though. Strafe blurring is applied at every pitch level.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Sun May 05, 2019 7:25 am
by namsan
I tested the new version of your mod and I like it even more.
motion blur on jumping and falling is pretty cool to see.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Mon May 06, 2019 9:01 pm
by Pixel Eater
Thanks Namsan. I especially love the falling effect too :)

After a little "bread-boarding" I think I could get a zoom effect that won't look like complete ass. It won't happen too soon though.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Tue May 07, 2019 8:32 pm
by Caligari87
So feature request I suppose. Could the rotational blur (perhaps optionally?) be based on the delta between the player's last and current angle/pitch, instead of mouse input? I play a lot of hideous destructor and it'd be nice if the weapon recoil caused motion blur too.

Slightly relatedly, perhaps the blur intensity could be averaged out over the last few tics instead of per-tic?

8-)

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Wed May 08, 2019 3:13 am
by Nash
Good work so far. Although TBH I'm not sure how I feel about the velocity blur. While I do welcome its addition (I think I might have requested it, can't remember), I think it looks a bit strange when I am holding down forward and side move (so I'm moving diagonally) and then just by moving the mouse a little during this movement, the image starts to blur...

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Wed May 08, 2019 5:04 pm
by Pixel Eater
I love the idea of the recoil having an effect. When I rework it for zoom blurring I think that'll be easier to implement too.

I reckon you've come across the same issue with it as I have Nash- that when you circle-strafe, your target should be more focused not less.

Considering all these things, this project could deal with a complete rewrite at some time.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Posted: Thu May 09, 2019 4:39 am
by Nash
Ah yes, circle strafing does produce the effect that I felt a strange about.