Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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)

And you must always ensure that "separate texture page" is checked otherwise you will get weird visual errors.

Yes, but seperate texture page causes the sprite that has been seperated to just replace the checkerboard. 

yes, the checkerboard is the dither. If you just use a gray sprite there will be no checkerboard or dither anymore.