- Joined
- Jul 31, 2017
- Messages
- 498
This module provides three shaders that can be used to mask images in different ways:
AlphaMaskShader
A shader that can be used to mask images depending on their pixels alpha values. The threshold value is set via SetAlpha.
RedMaskShader
A shader that can be used to mask images with a secondary image mask and the corresponding pixel's red value. The threshold value is set via SetAlpha.
StaticRedMaskShader
Similar to RedMaskShader, but the threshold is set by MaskShader.SetThreshold, thus allowing to use SetAlpha for additional transparency.
The Module comes with docs and examples. If the docs don't build, try Mikes newest makedocs_winnt.exe.
Here's an example of the three different shaders (AlphaMaskShader, RedMaskShader and StaticRedMaskShader with threshold set to 0.4):
Edit March 06, 2018
Forgot to mention: I hereby put the module including the glsl shaders under a CC0 license.
Edit March 09, 2018
The glsl files in the archive still contained huge commented blocks of code - removed them, uploaded updated archive.
AlphaMaskShader
A shader that can be used to mask images depending on their pixels alpha values. The threshold value is set via SetAlpha.
RedMaskShader
A shader that can be used to mask images with a secondary image mask and the corresponding pixel's red value. The threshold value is set via SetAlpha.
StaticRedMaskShader
Similar to RedMaskShader, but the threshold is set by MaskShader.SetThreshold, thus allowing to use SetAlpha for additional transparency.
The Module comes with docs and examples. If the docs don't build, try Mikes newest makedocs_winnt.exe.
Here's an example of the three different shaders (AlphaMaskShader, RedMaskShader and StaticRedMaskShader with threshold set to 0.4):
Edit March 06, 2018
Forgot to mention: I hereby put the module including the glsl shaders under a CC0 license.
Edit March 09, 2018
The glsl files in the archive still contained huge commented blocks of code - removed them, uploaded updated archive.
Attachments
Last edited: