Demake Shaders

Demake Shaders

Postby RuscoIstar » Tue Jul 21, 2020 6:02 pm

GZDoomDemakeShaders
GLSL shaders for GZDoom 3.5.0+ that simulate various vintage systems.

Image

Download | Source | Screenshots | Videos

Project's Scope
Doom has been ported to countless devices, most of which have enough processing ability to run the game natively. But that wasn't always the case, and many older computers and video game consoles by 1993 simply were just not powerful enough to run this almighty game. While this situation hasn't changed at all for those ageing systems, it's now possible to use modern source code ports and hardware to simulate what the game might have looked like on systems with less than the minimum requirements (80386DX@33MHz CPU, 4MB DRAM, 20MB HDD & VGA Graphics). There is certainly some charm and interest around the retro-computing look; low resolutions and constrained colour palettes are an aesthetic that keeps on giving nostalgic thrills. This mod is for those who want some chunky pixely goodness.

Roadmap of Features
Refresh Rate Limiter: Control the max frame rate of the engine.
Palette Reduction w/ Ordered Dither: Part of the MariFX Shaders for GZDoom, modified to accept more than 64 palettes and optimized to reduce its video memory footprint.
Multiple retro-systems palettes and colour modes: Videogame home consoles and portable systems, Vintage graphic systems, Monochrome, Grayscale and various RGB levels/bit-depths.
Resolution scaler w/ Non-squared Pixel Aspect Ratios
"Low-Detail" mode (double-width pixels)
Customizable Scanlines and LCD Grid
CRT and LCD simulation
NTSC TV-output Color grading

Acknowledgements
Adam Mathes: Identity CLUTs primer.
Ahefner: NES colour palette and colour emphasis bits info.
Alex Charlton: "Dithering on the GPU" primer.
Alison Watson: ZScript documentation.
Jeremy Selan: GLSL LUT optimized shaders.
khronos.org: GLSL Optimizations and general documentation.
Marisa Kirisame: Palette Reduction w/ Dither GLSL shader.
Pixel Eater: Atari Jaguar Color Space GLSL shader (from Vanilla Essence).
Rachael: Low detail shader.
RiskyJumps: Scanlines shader from libretro.
Sigvatr: EGA Doom.
Super Mario Wiki: Super Game Boy colour palettes info.
VCCE: Tandy CoCo3 palette.
Zdoom.org: (G)ZDoom wiki.

--

I want to clarify that this is my first project using the GL Shader Language and the first time I use github to open my source code; sorry if this appears as a cheap hack job. I did my best to document and reference some pieces of code I didn't come up with but served me as great practical examples.
Last edited by RuscoIstar on Sun Aug 23, 2020 8:41 pm, edited 5 times in total.
User avatar
RuscoIstar
 
Joined: 16 Sep 2019
Location: Mexico City
Discord: RuscoIstar#2063
Twitch ID: rodylg
Github ID: rodylg
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel with Vulkan Support

Re: Demake Shaders

Postby cubebert » Tue Jul 21, 2020 9:05 pm

This is a beautiful set of shaders you've made that came with a lot of options. I gave it a go to test out the palettes and I was surprised to see that they were over 100 of them! I played a little bit of the first episode using the SNES palette with pixelization and dithering and it looks amazing!



I will say however that some of the palettes can look a bit murky even with the sector light mode set to "Bright". For comparison, this is the same scene being rendered on the Sega Genesis palette and without it.




In addition, I think there's a bug that prevents the player's weapon from being pixelized if dithering is put to zero. Besides that bug and some of the palettes though, I think it's a very neat mod that deserves some attention. Well done!

Is is okay for other people to use this in their mods, provided that they give you credit?
User avatar
cubebert
 
Joined: 14 Jun 2020
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Demake Shaders

Postby RuscoIstar » Wed Jul 22, 2020 8:18 pm

Thank you for the compliments and feedback! Let me address each of these issues one by one.

cubebert wrote:I will say however that some of the palettes can look a bit murky even with the sector light mode set to "Bright". For comparison, this is the same scene being rendered on the Sega Genesis palette and without it.

Some palettes might look really murky or undiscernible because of their lacking colour gamut. In the particular case of the Sega Genesis palette (and also the Nomad, NEC PC Engine/TurboGrafx-16 and Atari ST) we are talking about a 9-bit RGB palette (512 colours in total). Let's take a look at it.



You will find out that there is a great lack of gray tonalities (there are only 8 in total!) and that's what makes certain textures lose their details completely. That's where dithering comes in handy to fake certain shading! Click the image to see an animation showing different levels of dithering.



Some other cases are even more extreme, like the GB palettes which are only 4 colours in total. In cases like that dithering can be insufficient and the only thing that I have found to increase image clarity is bumping the render resolution up... :cry: Believe me that I tried a lot of things to improve things while this project was in the alpha stage, but such is the nature of constrained palettes. Good news for the fans of the Genesis tho; when I created its CLUT file I applied a really naive algorithm to generate it and since it's only 512 colours I can use another method to crush the blacks on the image. I will update it soon, along with a request I got for adding the scanline shader.

cubebert wrote:In addition, I think there's a bug that prevents the player's weapon from being pixelized if dithering is put to zero.

Ah, yes, that was a small oversight. I know what's missing and I'll fix that as well. Thanks!

cubebert wrote:Besides that bug and some of the palettes though, I think it's a very neat mod that deserves some attention. Well done!

Is is okay for other people to use this in their mods, provided that they give you credit?

That's why the code is on github under a GPL-3.0 license~ :wink:
Just be sure to not forget the people I added in the ack section since I didn't do this all just on my own.

Update: I fixed the issues and just uploaded the 0.3.0 version to Moddb. It now features scanlines.
I also changed the readout scale of the dithering slider from [0.0 - 1.0] to integers [0 - 256]. The level of dithering remains the same.
This is a new screenshot of the reference scene with sector light mode set to Bright and using the new Genesis palette with a dithering level of 0 (Off).

User avatar
RuscoIstar
 
Joined: 16 Sep 2019
Location: Mexico City
Discord: RuscoIstar#2063
Twitch ID: rodylg
Github ID: rodylg
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel with Vulkan Support

Re: Demake Shaders

Postby BradmanX » Sun Aug 02, 2020 12:45 pm

After trying it out a bit, gotta say, this has become one of my favorite shader mods, can't wait to see what comes in later versions ^_^
Last edited by BradmanX on Sun Aug 02, 2020 11:17 pm, edited 1 time in total.
User avatar
BradmanX
 
Joined: 23 Nov 2012

Re: Demake Shaders

Postby RuscoIstar » Sun Aug 02, 2020 2:47 pm

BradmanX wrote:After trying it out a bit, gotta say, this has become one of my favorite shader mods, can't what to see what comes in later versions ^_^


Thank you! I just updated the mod to version 0.3.1 to fix a few things that were bothering me (and to fix Delta Touch yet again because of OpenGL ES lol). I am satisfied with how it looks for now so I'm taking a small break from this project because of some IRL things but I'll keep an eye for feedback. At least right now I feel it is at a state where people can get plenty of enjoyment out~ :D
User avatar
RuscoIstar
 
Joined: 16 Sep 2019
Location: Mexico City
Discord: RuscoIstar#2063
Twitch ID: rodylg
Github ID: rodylg
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel with Vulkan Support

Re: Demake Shaders

Postby BradmanX » Mon Aug 03, 2020 8:03 am

RuscoIstar wrote:Thank you! I just updated the mod to version 0.3.1 to fix a few things that were bothering me (and to fix Delta Touch yet again because of OpenGL ES lol). I am satisfied with how it looks for now so I'm taking a small break from this project because of some IRL things but I'll keep an eye for feedback. At least right now I feel it is at a state where people can get plenty of enjoyment out~ :D


No problem, I've always wanted to see what different Doom Engine games and mods would look like with the palette of another system, so I was honestly excited when I saw this and how many different options there were.:D

And yeah, take your time with it, the mod seems to be in a fairly stable and usable state already and with so many different options, I can't imagine people getting bored with it anytime soon.
User avatar
BradmanX
 
Joined: 23 Nov 2012


Return to Shaders

Who is online

Users browsing this forum: No registered users and 0 guests