summaryrefslogtreecommitdiffstats
path: root/brdf.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'brdf.cginc')
-rwxr-xr-xbrdf.cginc4
1 files changed, 3 insertions, 1 deletions
diff --git a/brdf.cginc b/brdf.cginc
index 38aec90..4081d49 100755
--- a/brdf.cginc
+++ b/brdf.cginc
@@ -250,7 +250,9 @@ float4 brdf(Pbr pbr, LightData data, out BrdfData bd) {
#else
float3 emission = 0;
#endif
- return float4(diffuse + specular + emission, pbr.albedo.a);
+ float4 lit = float4(diffuse + specular + emission, pbr.albedo.a);
+ // Scale albedo by alpha.
+ return float4(lit.rgb * lit.a, lit.a);
}
#endif // __BRDF_INC