diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-23 23:28:16 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-23 23:28:16 -0700 |
| commit | 51930cd07ac1a17a05b9848ac8d6639170b3d571 (patch) | |
| tree | 79bcf7f82d26adac3b29032b94a0f673b78238cc /brdf.cginc | |
| parent | 29443dfbd4b3ecbe5d0cae654e9cb72555b17220 (diff) | |
Tweaks - do premultiplied alpha, add a [branch], adjust slider limits
Diffstat (limited to 'brdf.cginc')
| -rwxr-xr-x | brdf.cginc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |
