Jump to content


Photo

RetroFexx - Oldschool Palettes with Dither *UPDATED*


  • Please log in to reply
7 replies to this topic

#1 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 30 October 2014 - 04:59 AM

RetroFexxBanner.png
 
Featuring Shaders:

  • 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!
To use:

  • 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:
            RFX_set_coldepth();
  • 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)
HINT 2
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
 
Playable Demo
 
2682_original.png?1414596418
 
2683_original.png?1414596440
 
2684_original.png?1414596451
 
RetroFexx2.png


Edited by Indecom4000, 25 March 2016 - 08:02 PM.

  • 4

LD-Logo-sml.png


#2 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 12 November 2014 - 08:31 PM

Woot, This asset made it to the spotlight!


  • 0

LD-Logo-sml.png


#3 FolkerHQ

FolkerHQ

    GMC Member

  • GMC Member
  • 7 posts
  • Version:GM:Studio

Posted 27 November 2014 - 02:10 AM

Will the shader-pack at the marketplace include the playable demo?


  • 0

#4 karlos

karlos

    GMC Member

  • Banned Users
  • 401 posts
  • Version:GM:Studio

Posted 27 November 2014 - 08:26 AM

Love it!

#5 messhof

messhof

    GMC Member

  • GMC Member
  • 76 posts
  • Version:Unknown

Posted 08 March 2015 - 10:42 PM

Awesome asset! It's pretty light on documentation... any chance you could include the source to that playable example? Or explain how the RFX_palswap_shd() script works?


  • 0

#6 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 06 April 2015 - 08:51 PM

Sorry for the lack of replies lately folks. I've been living without internet for some time. It's been quite terrible. I'll update the asset with some more information on how to use it, as well as include a demo. I can't include the playable one i've linked since it contains purchased assets.


  • 0

LD-Logo-sml.png


#7 Firgof

Firgof

    GMC Member

  • GMC Member
  • 54 posts

Posted 06 August 2015 - 12:05 AM

Palette swap seems to be completely broken - and I bought this package explicitly for that.

Attempting to use it just results in a full-white screen.

 

Also, when's that documentation going to arrive?  I hope this wasn't a waste of money.


Edited by Firgof, 06 August 2015 - 12:27 AM.

  • 0

#8 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 25 March 2016 - 04:47 PM

@everyone having issues, I've just tested the asset and everything seems to work just fine from my end. I'll update the first post with a bit more info to get you started, but i'll post it here below as well:

 

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 assigned to RFXpal, a global variable that the RFX system relies on when calling the following functions.
        RFX_set_palswap(sprite_get_texture(sprite_index,image_index));

 

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


Edited by Indecom4000, 25 March 2016 - 07:57 PM.

  • 0

LD-Logo-sml.png