Skip to content

Commit

Permalink
fix textureMask (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenebokhan authored Oct 29, 2020
1 parent b8e1a09 commit dcb3420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Alloy/Shaders/Shaders.metal
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void textureMask(texture2d<T, access::read> source,
filter::linear);
const auto positionF = float2(position);
const auto textureSizeF = float2(textureSize);
const auto normalizedPosition = (positionF.x + 0.5f) / textureSizeF;
const auto normalizedPosition = (positionF + 0.5f) / textureSizeF;

auto maskValue = mask.sample(s, normalizedPosition);
if (isInversed) {
Expand Down

0 comments on commit dcb3420

Please sign in to comment.