diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-01 19:51:36 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-01 19:51:36 -0800 |
| commit | 92c9035bb513886f99fde8c08694d9d6baa6f305 (patch) | |
| tree | 5d9786f185ec76af08834432c1fee077cd4f526f /math.cginc | |
| parent | 4463becae15767e900255b92eab7f8b781e4e020 (diff) | |
Add decal slot
Diffstat (limited to 'math.cginc')
| -rwxr-xr-x | math.cginc | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -105,5 +105,9 @@ float luminance(float3 rgb) { return dot(float3(0.2126, 0.7152, 0.0722), rgb); } +float4 alpha_blend(float4 src, float4 dst) { + return float4(src.rgb * src.a + dst.rgb * (1 - src.a), src.a + dst.a * (1 - src.a)); +} + #endif // __MATH_INC |
