A downloadable Shader Suite

Buy Now$2.00 USD or more

*WIP*

The RFX Shader suite is a library of shaders and scripts designed to give your Gamemaker projects that retro paletted dithery look of yesteryear.

Features:

  • Pixelation - including double wide pixels.
  • SSAA - optional control for reduced aliasing and moire, doesn't require display_reset to use!
  • Two color limiting shaders - LUT based and Color Depth limiting
  • Multiple draw functions for drawing surfaces or sprites with the effect enabled.
  • Includes sample Luts
  • Includes bayer and blue noise dither textures

To make your own LUT, follow this guide, be sure to download a copy of the LUT provided on this page as it matches the format used by the RFX Suite: https://docs.unity3d.com/540/Documentation/Manual/script-ColorCorrectionLookup.h...

To use the suite:

The following will set key values for the system:

  • RFX_init(pixel width, dither texture, dither spread, SSAA(?), double wide pixels(?))

The following will set which method to use:

  • RFX_set_palswap( Lut texture )
  • RFX_set_coldepth(Color Depth) (Lower the Depth for fewer colors)

To use the shaders on a sprite or surface:

  • RFX_draw_sprite( sprite, index, xx, yy, xScale(?), yScale(?), Rot(?), Col(?), Alpha(?))
  • RFX_draw_surface(surface, xx, yy, xScale(?), yScale(?), Rot(?), Col(?), Alpha(?))

To apply to the screen you can use the RFX_draw_surface function with application_surface in the draw_gui event, or you can use the following the draw_gui event:

  • RFX_apply_screen()

Feel free to post any questions or requests below!


*(?) arguments are optional and can be left out to use the default values.

Purchase

Buy Now$2.00 USD or more

In order to download this Shader Suite you must purchase it at or above the minimum price of $2 USD. You will get access to the following files:

RFXSuite.yymps 418 kB

Comments

Log in with itch.io to leave a comment.

Hey, I'm having some issues! I get these weird lines when I'm using RFX_apply_screen(); in the draw gui, with

RFX_init(1, spr_DitherPattern,10);

var _tex = sprite_get_texture(RFXpalettes_spr,8);

RFX_set_palswap(_tex);

application_surface_draw_enable(false);

What happens when you change the first RFX_init(1, spr_DitherPattern,10); to use a value higher than 1 for the first argument?

(1 edit)

Update: It seemed to fix itself! I have no idea how but when using a different texture for the terrain it's just gone. 

But could you just explain to me what each argument is exactly, and what number range they should be in, I have no idea if the arguments I provided are ridiculous or somewhat close to what you intended. 

Thanks for your help!

Make sure that separate texture page is set to on for any dither or lut texture you might use. 

Here's a breakdown of the RFX_Init function:

RFX_init(pixel width, dither texture, dither spread, SSAA(?), double wide pixels(?))

  • Pixel Width: How wide the pixels are on screen, 1 is unchanged from screen resolution, 2 two pixels wide, etc. Basically the bigger this number, the chunkier the graphics.
  • Dither texture should be pretty self explanatory, just use sprite_get_texture(dither_sprite,image_index)
  • Dither Spread, this controls how much dithering is visible, I used numbers between 32 and 256. The higher the number, the less dithering there is visible in the final result.
  • SSAA is an optional argument that enables or disables full screen antialiasing. It can result in a smoother looking image with a higher number. Be careful not to go too high or you will end up with a blurry looking final result.
  • Double Wide Pixels: This is the effect used in the thumbnail of this asset. It just makes each pixel twice as wide. It's a neat effect in my opinion, but some folks might not prefer it, therefore it is an optional argument.

(1 edit)

Hi! Thanks for your help, but now a much more major issue has appeared. When creating any sprite, it doesn't even have to be drawn, and using rfx_apply_screen in draw gui, dithering is disabled and I get these weird checkerboard patterns

This happens with any sprite I create, and I think it might be the texture page, but clicking separate texture page simply replaces the checkerboard with the sprite. 

The only way to disable dithering is to use a dither texture that is just solid gray (50% luminance)

Sorry, I'm kinda new to Gamemaker. Can you please explain further how to use these shader? Maybe give an example. Thanks

The best way to know how to help you is to know what your plans are. The way the shader is set up is pretty simple, but if you don't have much GM experience, having a plan first can go a long way to getting you on the right track.

Sure. Let's say I want to do a Dither effect like in the last screenshot. In which event should I enter the code? Should all lines go into the draw_gui event? Thanks for your help.

It depends, again. Are you working on a game that already has graphics, and is functional? Is it a 3d game or a 2d game?

awesome! Getting it now!

Thanks a million! If you have any issues, or questions or requests feel free to message me!

HOOOO this looks really good! This'll do great!

Thank you very kindly! I'm looking forward to testing this out in combination with one of those crt shaders. I think that would be a killer combination!