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
File Name: DitheringAlphaTest.zip
Size: 2.96 KB
I updated the shader to follow some requirements of AMD and Intel GPUs, it should work properly now.
Looks interesting, but once I set the shader - entire material becomes pink
What error do you get in the log ?
[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.
@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?
I updated the file to make it compatible with Substance Painter 1 and 2 now. :)
View a short video how to use it.Please
can you please tell us how it's work?
This is cool , but will Vray use this feature?
@rupertprojects : This shader is intended for the OpenGL (and realtime) viewport, VRay can't use it and especially doesn't need it.
Alpha Dithering is supported by default in default shaders since Substance painter 2.5. You don't need this asset anymore.
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