Page 1 of 4

[WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Aug 19, 2016 8:40 pm
by torridgristle
GZDoom Dev Build
Image

Tired of GZDoom's sterile smoothness? So am I. There's just something aesthetically pleasing about low colour and low resolution graphics, and this shader does just that.

Spoiler: Screenshots

Download
RetroShader.pk3

Instructions:
This replaces the Lens Distortion shader in the recent GZDoom dev builds, so enable Lens Distortion under Display Options -> OpenGL Options -> Preferences. While you're there, set Sector Light Mode to Software. To make lights extra pronounced you can go to OpenGL Options -> Dynamic Light Options and set the Light Size to 2.

Customization:
Open up the PK3 in Slade and open lensdistortion.fp, you'll now see a neat list of variables you can change. Enable or disable effects with a simple 1 or 0, no more copy and pasting shaders in and out of files.

Additional Fun:
To get PlayStation vertex jiggles in GZDoom, open gzdoom.pk3, navigate to shaders/glsl/main.vp, and in a new line after "gl_Position = ProjectionMatrix * eyeCoordPos;" add "gl_Position.xy = floor(gl_Position.xy/gl_Position.w*(1./0.015))*0.015*gl_Position.w;//The Vertex Jiggler" Setting 0.015 lower will lower the jiggle, setting is higher will increase the jiggle. This affects sprites, HUDs, menus, and HUD messages as well.

Spoiler: Credits

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Tue Sep 06, 2016 11:39 am
by Trusty McLegit
Dude this thing is fucking awesome! A couple things you can do to make the experience more true to classic doom is to set tonemap mode to palette, as well as set cl_capfps to 1 in the console.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Tue Sep 06, 2016 11:48 am
by Rachael
Nice! It is fun seeing all the mods coming out of the post-processing code now that it has been released. Maybe in the future, we might get a platform for custom post-processing shaders that will actually be officially supported for mods.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Tue Sep 06, 2016 12:34 pm
by JPL
Here's some video of the Playstation style vertex jiggles, as it's basically impossible to capture in screenshots:


Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Tue Sep 06, 2016 12:48 pm
by Nash
torridgristle wrote:To make lights extra pronounced you can go to OpenGL Options -> Dynamic Light Options and set the Light Size to 2.


Just as a "by the way", this setting has been removed and will be absent in future versions of GZDoom. :D

EDIT: Oh god the vertex jiggling really does look just as awful as how I remember it looking on the PlayStation. Now all you need to complete the look is the ugly-ass perspective texture distortion. Good job. :P

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Tue Sep 06, 2016 1:56 pm
by torridgristle
I've modified the vertex jiggler since then, but I've lost interest in it.

Code: Select allExpand view
   gl_Position = ProjectionMatrix * eyeCoordPos;
if ( gl_Position.w == 1 )//The vtexCoord Jiggler Disabled
      {
      vTexCoord = vTexCoord;
      }
else//The vtexCoord Jiggler Enabled   
{
   vTexCoord = floor(vTexCoord*(gl_Position.w*0.9))/(0.9*gl_Position.w);
}
if ( gl_Position.w == 1 )//The gl_Position Jiggler Disabled
      {
      gl_Position.xy = gl_Position.xy;
      }
else//The gl_Position Jiggler Enabled
{
//   gl_Position.xy = floor(gl_Position.xy*0.8)*(1/0.8);
   gl_Position.xy = floor(gl_Position.xy*(gl_Position.w*0.8))*(1/(gl_Position.w*0.8));
}


Can't say I'm pleased that someone is deciding that I shouldn't be able to adjust the size or intensity of GL lights for my own personal experience, the settings in lights.pk3 were arbitrarily designed to begin with.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Wed Sep 07, 2016 3:13 am
by SigFloyd
Just having the pixelated shader by itself is a goddamn dream come true.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Wed Sep 07, 2016 5:43 am
by mumblemumble
Absolutely awesome, now I can have that "Is that a nazi or a potted plant" feeling without having low resolution. I feel like I should combine this with the most fancy and visual map / mod, just for the sake of irony.

Any chance you can make a version with even more pixilation?

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Thu Sep 08, 2016 12:39 pm
by Woolie Wool
For me, the weapon sprites don't scale correctly and have "swimming" pixels and reduced detail, even though I set the aspect ratio in the pk3 to the correct value (16:10).

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 12:59 am
by Matt
...this plus the new bloom is everything I've always wanted in a modernized Doom.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 2:00 am
by Tormentor667
This should so much end up in the official release of GZDoom!

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 2:03 am
by Nash
dpJudas, how about a retro/PlayStation mode in GZDoom? X-P

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 6:48 am
by dpJudas
Sorry, I have no plans adding such a thing. GZDoom does accept feature suggestions if they come with a pull request though. :)

One of the reasons I want to extend GLDEFS with support for screen space shaders is to allow stuff like this without requiring it to be part of gzdoom itself.

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 8:56 am
by Tormentor667
dpJudas wrote:GZDoom does accept feature suggestions if they come with a pull request though. :)

Can someone take care of that? :D

Re: [WIP] RetroShader =Computer Friendly!= Update 4

PostPosted: Fri Sep 09, 2016 11:49 am
by JPL
dpJudas wrote:One of the reasons I want to extend GLDEFS with support for screen space shaders is to allow stuff like this without requiring it to be part of gzdoom itself.


I definitely support this route, for any visual treatment that isn't from the standard post-processing toolbox (the way, say, tone mapping and bloom are). Let mods create all the cool wild stuff that stretches beyond what an engine should do out-of-the-box.