Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: Oomek on June 01, 2017, 06:09:56 AM

Title: [WIP] Blur Shader
Post by: Oomek on June 01, 2017, 06:09:56 AM
Attract Mode Blur Shader WIP - Snaps
https://youtu.be/FVazVqXL_bY

Attract Mode Blur Shader WIP - Videos
https://youtu.be/7x7etZvlvVs
Title: Re: [WIP] Blur Shader
Post by: jedione on June 01, 2017, 06:38:38 AM
cool,,cool,when can we start to use them?
were to get..
Title: Re: [WIP] Blur Shader
Post by: Oomek on June 01, 2017, 07:13:47 AM
Not sure as I started it this morning, need to wrap it up in a module. Will take few days If I won't encounter any complications.
Title: Re: [WIP] Blur Shader
Post by: liquid8d on June 01, 2017, 02:55:19 PM
Looks great, awesome job! So you were able to do this strictly through shaders and a custom class/function in squirrel? I was under the impression that the blend modes couldn't be done without changes to the backend.. glad to see i was wrong :P
Title: Re: [WIP] Blur Shader
Post by: Oomek on June 01, 2017, 04:20:04 PM
Blending modes could have been faster when used internally through the output merger, but limited to only 3 modes. I'm glad I've decided to go with shaders.

For the last few weeks I was busy building my first cab. Now when it's done I can come back to shaders and finish it all. Still not quite sure what algo I'm going to use for the blur, Gaussian or Kawase. Need some more testing.
Title: Re: [WIP] Blur Shader
Post by: keilmillerjr on June 04, 2017, 05:43:36 PM
Ohhh nice...  :D

Blur is one of those things that can make text pop, which is important for low res monitors.
Title: Re: [WIP] Blur Shader
Post by: Oomek on June 04, 2017, 06:51:23 PM
I don't follow. How can blur pop text out? You mean glow?
Title: Re: [WIP] Blur Shader
Post by: keilmillerjr on June 06, 2017, 05:45:57 AM
I don't follow. How can blur pop text out? You mean glow?

Anything close to a solid color makes text more readable. It's design 101. Take an image that is blurry and add text. Your eyes focus on the text instead of the image. The text is more defined at low resolutions where too much going on makes text illedgable.
Title: Re: [WIP] Blur Shader
Post by: keilmillerjr on December 29, 2018, 09:45:54 AM
Any update on this shader?
Title: Re: [WIP] Blur Shader
Post by: Oomek on December 29, 2018, 09:47:44 AM
I can share if you are brave enough to clean it up and wrap into a class ;)
Title: Re: [WIP] Blur Shader
Post by: keilmillerjr on December 29, 2018, 09:50:16 AM
I can share if you are brave enough to clean it up and wrap into a class ;)

You got it! This week I revised the shader module. Hopefully it will be more useful for everyone! Will release before wednesday, my first day back to work.
Title: Re: [WIP] Blur Shader
Post by: Oomek on December 29, 2018, 09:53:39 AM
It's a multipass kawase blur. It has a variable radius and deband which still needs to be tied to the radius. Atm these 2 parameters are independently set.
Title: Re: [WIP] Blur Shader
Post by: Oomek on December 29, 2018, 09:54:56 AM
And obviously those 2 need to somehow scale to the level of pre-downsampling. I have't got time to figure out that part yet.
Title: Re: [WIP] Blur Shader
Post by: zpaolo11x on December 30, 2018, 03:12:19 PM
And obviously those 2 need to somehow scale to the level of pre-downsampling. I have't got time to figure out that part yet.

How do you implement pre-downsampling? I use the trick of placing the image on a surface of a desired size (so in the end for a two-pass downsampled filter I need two surfaces), is there a way you can do the downsampling in the shader?
Title: Re: [WIP] Blur Shader
Post by: Oomek on December 30, 2018, 03:14:25 PM
That's exactly what I did. I draw a mimpapped image on a texture with reduced size and then use it as an input in the shader.