AAAAAAAAAH ROOT TRANSFORM

This commit is contained in:
2025-12-16 20:22:42 -05:00
parent 4cf5304c79
commit b4b4fe3714

View File

@@ -555,9 +555,17 @@ namespace anm2ed::imgui
auto uvMin = frame.crop / texSize;
auto uvMax = (frame.crop + frame.size) / texSize;
vec3 frameColorOffset = frame.colorOffset + colorOffset + sampleColor;
vec4 frameTint = frame.tint;
if (isRootTransform)
{
auto rootFrame = animation->rootAnimation.frame_generate(sampleTime, anm2::ROOT);
vec3 frameColorOffset = frame.colorOffset + rootFrame.colorOffset + colorOffset + sampleColor;
vec4 frameTint = frame.tint * rootFrame.tint;
frameColorOffset += rootFrame.colorOffset;
frameTint *= rootFrame.tint;
}
frameTint.a = std::max(0.0f, frameTint.a - (alphaOffset + sampleAlpha));
auto vertices = math::uv_vertices_get(uvMin, uvMax);