Fix the random pixel gaps that were a bit atrocious especially for web

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/28/head
parent 4556fc903c
commit b1d3b36dd5
  1. 8
      Crawler/olcPixelGameEngine.h

@ -2863,8 +2863,8 @@ namespace olc
di.decal = decal; di.decal = decal;
di.tint = { tint, tint, tint, tint }; di.tint = { tint, tint, tint, tint };
di.pos = { { vQuantisedPos.x, vQuantisedPos.y }, { vQuantisedPos.x, vQuantisedDim.y }, { vQuantisedDim.x, vQuantisedDim.y }, { vQuantisedDim.x, vQuantisedPos.y } }; di.pos = { { vQuantisedPos.x, vQuantisedPos.y }, { vQuantisedPos.x, vQuantisedDim.y }, { vQuantisedDim.x, vQuantisedDim.y }, { vQuantisedDim.x, vQuantisedPos.y } };
olc::vf2d uvtl = (source_pos + olc::vf2d(0.0001f, 0.0001f)) * decal->vUVScale; olc::vf2d uvtl = (source_pos + olc::vf2d(0.01f, 0.01f)) * decal->vUVScale;
olc::vf2d uvbr = (source_pos + source_size - olc::vf2d(0.0001f, 0.0001f)) * decal->vUVScale; olc::vf2d uvbr = (source_pos + source_size - olc::vf2d(0.02f, 0.02f)) * decal->vUVScale;
di.uv = { { uvtl.x, uvtl.y }, { uvtl.x, uvbr.y }, { uvbr.x, uvbr.y }, { uvbr.x, uvtl.y } }; di.uv = { { uvtl.x, uvtl.y }, { uvtl.x, uvbr.y }, { uvbr.x, uvbr.y }, { uvbr.x, uvtl.y } };
di.w = { 1,1,1,1 }; di.w = { 1,1,1,1 };
di.mode = nDecalMode; di.mode = nDecalMode;
@ -2891,8 +2891,8 @@ namespace olc
di.decal = decal; di.decal = decal;
di.tint = { tint, tint, tint, tint }; di.tint = { tint, tint, tint, tint };
di.pos = { { vScreenSpacePos.x, vScreenSpacePos.y }, { vScreenSpacePos.x, vScreenSpaceDim.y }, { vScreenSpaceDim.x, vScreenSpaceDim.y }, { vScreenSpaceDim.x, vScreenSpacePos.y } }; di.pos = { { vScreenSpacePos.x, vScreenSpacePos.y }, { vScreenSpacePos.x, vScreenSpaceDim.y }, { vScreenSpaceDim.x, vScreenSpaceDim.y }, { vScreenSpaceDim.x, vScreenSpacePos.y } };
olc::vf2d uvtl = (source_pos + olc::vf2d(0.0001f, 0.0001f)) * decal->vUVScale; olc::vf2d uvtl = (source_pos + olc::vf2d(0.01f, 0.01f)) * decal->vUVScale;
olc::vf2d uvbr = uvtl + ((source_size - olc::vf2d(0.0001f, 0.0001f)) * decal->vUVScale); olc::vf2d uvbr = uvtl + ((source_size - olc::vf2d(0.02f, 0.02f)) * decal->vUVScale);
di.uv = { { uvtl.x, uvtl.y }, { uvtl.x, uvbr.y }, { uvbr.x, uvbr.y }, { uvbr.x, uvtl.y } }; di.uv = { { uvtl.x, uvtl.y }, { uvtl.x, uvbr.y }, { uvbr.x, uvbr.y }, { uvbr.x, uvtl.y } };
di.w = { 1,1,1,1 }; di.w = { 1,1,1,1 };
di.mode = nDecalMode; di.mode = nDecalMode;

Loading…
Cancel
Save