Преглед изворни кода

gpu: ugly hack to avoid sprite artifacts on the PS3.

legacy
Sam Hocevar sam пре 13 година
родитељ
комит
aeda5c74f7
1 измењених фајлова са 9 додато и 1 уклоњено
  1. +9
    -1
      src/tileset.cpp

+ 9
- 1
src/tileset.cpp Прегледај датотеку

@@ -179,7 +179,7 @@ ivec2 TileSet::GetSize(int tileid) const


vec2 TileSet::GetImageSize() const vec2 TileSet::GetImageSize() const
{ {
return vec2(data->isize);
return vec2(PotUp(data->isize.x), PotUp(data->isize.y));
} }


vec2 TileSet::GetTileSize() const vec2 TileSet::GetTileSize() const
@@ -225,6 +225,14 @@ void TileSet::BlitTile(uint32_t id, vec3 pos, int o, vec2 scale,
dtx = -dtx; dtx = -dtx;
} }


#if 1
/* HACK: tweak UV values */
tx += (1.f / 128.f) * dtx;
ty += (1.f / 128.f) * dty;
dtx *= 126.f / 128.f;
dty *= 126.f / 128.f;
#endif

if (!data->img && data->m_texture) if (!data->img && data->m_texture)
{ {
float tmp[10]; float tmp[10];


Loading…
Откажи
Сачувај