mipgen preserve coverage alpha fix
This commit is contained in:
@@ -30,11 +30,12 @@ void main(uint3 DTid : SV_DispatchThreadID)
|
||||
// Weight by alpha if it has even partially opaque pixels:
|
||||
// This avoids losing alpha coverage, it will extrude the areas which have alpha
|
||||
// And also avoids bleeding in background color from transparent area
|
||||
color += float4(rrrr.x, gggg.x, bbbb.x, 1) * aaaa.x;
|
||||
color += float4(rrrr.y, gggg.y, bbbb.y, 1) * aaaa.y;
|
||||
color += float4(rrrr.z, gggg.z, bbbb.z, 1) * aaaa.z;
|
||||
color += float4(rrrr.w, gggg.w, bbbb.w, 1) * aaaa.w;
|
||||
color /= sum;
|
||||
color.rgb += float3(rrrr.x, gggg.x, bbbb.x) * aaaa.x;
|
||||
color.rgb += float3(rrrr.y, gggg.y, bbbb.y) * aaaa.y;
|
||||
color.rgb += float3(rrrr.z, gggg.z, bbbb.z) * aaaa.z;
|
||||
color.rgb += float3(rrrr.w, gggg.w, bbbb.w) * aaaa.w;
|
||||
color.rgb /= sum;
|
||||
color.a = max(aaaa.x, max(aaaa.y, max(aaaa.z, aaaa.w)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4134,6 +4134,7 @@ void UpdateRenderData(
|
||||
|
||||
wi::profiler::EndRange(range); // Morph Targets
|
||||
}
|
||||
device->EventEnd(cmd);
|
||||
|
||||
device->EventBegin("Skinning", cmd);
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 165;
|
||||
const int revision = 166;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user