This improved version of the Substance Painter alpha test shader allow to display much more precisely the opacity/transparency of an object without using the alpha blending shader and its limitations. The dithering is done with a classical Bayer matrix.

To use this shader, simply install it in your shelf folder (see here) and load it inside the Viewer Settings window of Substance Painter. Then add an opacity channel in your texture set if you don't have one.

Note : This shader method has now been included in Substance Painter 2.5 and beyond.

Uploaded: over 2 years ago
Updated: 8 months ago
Version: 4
File Name: DitheringAlphaTest.zip
Size: 2.96 KB

DownloadblackDOWNLOAD



DISCUSS
over 2 years ago

I updated the shader to follow some requirements of AMD and Intel GPUs, it should work properly now.


over 2 years ago

Looks interesting, but once I set the shader - entire material becomes pink


over 2 years ago

@theo.hallenius
What error do you get in the log ?


over 2 years ago

[GenericMaterial] pbr-alpha-test-dithering.glsl:31 | ERROR: 3:31: 'dither' : arrays of arrays supported with GLSL 4.3 or GLSL ES31 or GL_ARB_arrays_of_arrays enabled
Also I've got latest intel generic driver, updated a month ago at most.


over 2 years ago

@Froyok, had to rewrite the matrix as one dimensional array and it worked, thanks for the shader! Maybe for compability you shouldn't use multidimensional arrays?


about 2 years ago

I updated the file to make it compatible with Substance Painter 1 and 2 now. :)


about 2 years ago

View a short video how to use it.Please


about 2 years ago

can you please tell us how it's work?


about 1 year ago

This is cool , but will Vray use this feature?


about 1 year ago

@rupertprojects : This shader is intended for the OpenGL (and realtime) viewport, VRay can't use it and especially doesn't need it.


8 months ago

@DoughSmother
Alpha Dithering is supported by default in default shaders since Substance painter 2.5. You don't need this asset anymore.


8 months ago

Got a problem with a pink material overriding my texture sets. Using OpenGL, recently updated Nvidia drivers, added opacity channel, using SP 2 (2.6.1). Error displayed is:

[GenericMaterial] pbr-alpha-test-dithering.glsl:9 | 3(9) : error C7621: #extension directive must occur before any non-preprocessor token