Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Re: Simple Motion Blur 1.03a - Faster recovery

Postby Pixel Eater » Tue Jan 01, 2019 8:14 pm

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:
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.03a - Faster recovery

Postby Remaker » Tue Jan 01, 2019 8:31 pm

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. =:)
User avatar
Remaker
"Who are you?"
 
Joined: 01 Apr 2017
Location: Yank land.

Re: Simple Motion Blur 1.03a - Faster recovery

Postby Pixel Eater » Tue Jan 01, 2019 9:07 pm

Thanks for bug testing and sorry I wasn't able to help :(
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.03a - Faster recovery

Postby Beezle » Thu Jan 03, 2019 1:23 pm

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
Beezle
 
Joined: 16 Aug 2018
Discord: #8423

Re: Simple Motion Blur 1.03a - Faster recovery

Postby _mental_ » Tue Apr 30, 2019 9:14 am

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 allExpand view
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?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Simple Motion Blur 1.03a - Faster recovery

Postby Pixel Eater » Wed May 01, 2019 7:48 pm

_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.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Pixel Eater » Fri May 03, 2019 9:34 am

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.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Caligari87 » Fri May 03, 2019 3:39 pm

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-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Pixel Eater » Fri May 03, 2019 5:09 pm

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.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby namsan » Sun May 05, 2019 8:25 am

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.
User avatar
namsan
Loves English but hates Revenants
 
Joined: 31 Mar 2012
Location: Japan
Discord: Namsan#8146

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Pixel Eater » Mon May 06, 2019 10:01 pm

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.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Caligari87 » Tue May 07, 2019 9:32 pm

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-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Nash » Wed May 08, 2019 4:13 am

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...
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Pixel Eater » Wed May 08, 2019 6:04 pm

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.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Simple Motion Blur 1.04 - Bugfix & Velocity awareness

Postby Nash » Thu May 09, 2019 5:39 am

Ah yes, circle strafing does produce the effect that I felt a strange about.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

PreviousNext

Return to Shaders

Who is online

Users browsing this forum: No registered users and 0 guests