- RFX_coldepth_shd - Limit the color depth in the scene by any value. Higher numbers = more colors.
- RFX_palswap_shd - Swap out the palette to any of your choosing, any number of colors up to 4096!
Customize the dither of both shaders with a 128x128 texture and a dither spread value. HINT Play around with the dither spread value, keeping it too low will make everything grainy and keeping it high will make color transitions much sharper!
- Create a dither texture: dtex=sprite_get_texture(RFXbayerdith_spr,0);
- Init the RFX system: RFX_init( pixel scale, dtex, dither spread ( try 64 or 32 ) );
- Pick a shader:
- For Color Depth Shader:
- For Palette Shader:
RFX_set_palswap( sprite_get_texture(sprite_index,image_index) ); //Sprite_Index is the palette sprite you wish to use.
- Draw anything as you would normally, then in draw gui event: RFX_apply();
HINT This shader suite relies on the use of the application surface. To draw any gui items to be affected by this shader, you must draw them directly to the application surface with surface_set_target(application_surface)
Make sure that the texture your using for your palette hasn't been properly set using sprite_get_texture or background_get_texture, and that your palette looks the same as the ones included, RFXpalettes_spr. Also be sure the use for 3D check box checked on your palette. The texture generated using sprite/background_get_texture must be used as an argument for RFX_set_palswap.
The RFXpal (set by using RFX_set_palswap) and RFXshader variables are required by the RFX system to be set to the palette texture and the shader to use respectively. If these variables aren't set then you will likely get just a blank screen, same if you don't set the RFXshader variable to RFX_coldepth_shd or RFX_palswap_shd.
Click the banner above or visit the Marketplace here: MarketPlace/RetroFexx
Edited by Indecom4000, 25 March 2016 - 08:02 PM.