Skip to content

Commit

Permalink
fix edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Dec 25, 2024
1 parent b09a4a9 commit 609003b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions flixel/graphics/tile/FlxGraphicsShader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ class FlxGraphicsShader extends GraphicsShader
if (hasColorTransform)
{
openfl_ColorOffsetv = (openfl_ColorOffsetv * colorMultiplier) + (colorOffset / 255.0);
openfl_ColorMultiplierv *= colorMultiplier;
if (openfl_HasColorTransform)
{
openfl_ColorOffsetv = (openfl_ColorOffsetv * colorMultiplier) + (colorOffset / 255.0);
openfl_ColorMultiplierv *= colorMultiplier;
}
else
{
openfl_ColorOffsetv = colorOffset / 255.0;
openfl_ColorMultiplierv = colorMultiplier;
}
}
")
@:glFragmentHeader("
Expand All @@ -25,7 +33,7 @@ class FlxGraphicsShader extends GraphicsShader
vec4 flixel_texture2D(sampler2D bitmap, vec2 coord)
{
vec4 color = texture2D(bitmap, coord);
if (!hasTransform)
if (!(hasTransform || openfl_HasColorTransform))
return color;
if (color.a == 0.0)
Expand Down

0 comments on commit 609003b

Please sign in to comment.