Fix V0 chunk tex rendering

isolation_bkp/dynres
Dominik Madarász 2021-10-28 17:23:16 +02:00
parent 725486c1d0
commit bbc5856013
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ void DEBUG_draw_ground(uint64_t key, entity_view * data) {
float y = data->y * size + offset; float y = data->y * size + offset;
RenderTexture2D tex = GetChunkTexture(key); RenderTexture2D tex = GetChunkTexture(key);
DrawTextureEx(tex.texture, (Vector2){x, y}, 0.0f, -(size / (float)tex.texture.width), ColorAlpha(WHITE, data->tran_time)); float scale = (size)/(float)(tex.texture.width);
tex.texture.width *= scale;
tex.texture.height *= scale;
DrawTextureRec(tex.texture, (Rectangle){0, 0, size, -size}, (Vector2){x, y}, ColorAlpha(WHITE, data->tran_time));
if (zoom_overlay_tran > 0.02f) { if (zoom_overlay_tran > 0.02f) {
DrawRectangleEco(x, y, size-offset, size-offset, ColorAlpha(ColorFromHSV(data->color, 0.13f, 0.89f), data->tran_time*zoom_overlay_tran*0.75f)); DrawRectangleEco(x, y, size-offset, size-offset, ColorAlpha(ColorFromHSV(data->color, 0.13f, 0.89f), data->tran_time*zoom_overlay_tran*0.75f));