GMHoloSticker

CS2 style holographic sticker effect for GameMaker.

This library is for having holograph sticker etc effect in your game on similar manner that in CS2 it is being done. As this shader uses same method, this also supports lenticular style.

The shader allows to draw sprites or textures with holographic effect. The effect requires three images :

  • Base : the regular color.
  • Mask : the holoeffect mask.
  • Spec : the holospectrum

Base is just regular image, can can be anything.

Mask determines how strong holoeffect is, and what color it takes.

  • Red : Effect strength, blend factor between base color and spectrum.
  • Green : X-offset where to read from spectrum.
  • Blue : Y-offset where to read from spectrum.
  • Alpha : Just used as a multiplier for effect strength.

Spectrum is the holoeffect color.

  • Color can be anything.
  • Mask determines sampling XY-offset.
  • Surface normal and camera position determines "tilt", which adds X-offset.

This librarytries to deal with UV's and asset trimming, so you don't need to use "separate texture page".

-> Note, you might want to add some small zero-holoeffect padding around mask-image as otherwise effect might get stretched over in specific situations.

-> Note you need to supply scaling factor, if mask is not on same scale as base image.

Alphatest is required for 3D, as transparency can cause issues in general. -> You can set specific alphatest per HoloSticker. -> Use negative alphatest to disable it.

---

This was made originally for showing example in GameMaker discord server, but then decided to clean it up a bit and make as cookbook jam entry.

https://github.com/HannulaTero/GMHoloSticker/


Download

Download NowName your own price

Click download now to get access to the following files:

GMHoloSticker.yymps 6.5 MB
GMHoloSticker.yyz 6.5 MB
GMHoloSticker.zip 5.9 MB

Leave a comment

Log in with itch.io to leave a comment.