1
0
mirror of synced 2024-12-02 19:17:24 +01:00

Make sure to only use transparency if enabled for pbr shader

This commit is contained in:
KillzXGaming 2019-06-16 10:01:36 -04:00
parent ae1f2ebb79
commit 2ed4dd0971
4 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -375,8 +375,11 @@ void main()
fragColor.rgb = pow(fragColor.rgb, vec3(1 / gamma));
// Alpha calculations.
float alpha = GetComponent(AlphaChannel, texture(DiffuseMap, f_texcoord0));
fragColor.a = alpha;
if (isTransparent == 1)
{
float alpha = GetComponent(AlphaChannel, texture(DiffuseMap, f_texcoord0));
fragColor.a = alpha;
}
if (RenderAsLighting)
{