room changes

This commit is contained in:
Your Name 2026-08-12 03:02:07 -04:00
parent 8fae34b803
commit 38eaba2fa6
7 changed files with 2333 additions and 2108 deletions

View file

@ -128,6 +128,44 @@ wireNeonShader = love.graphics.newShader[[
}
]]
-- World renders a neighbouring room twice for the porous seam: once through
-- its own active channels and once through the current room's channels. This
-- shader only controls the alpha of that second, already-authored render, so
-- it never approximates the game's literal RGB colour treatment.
porousRoomBoundaryShader = love.graphics.newShader[[
extern number porousTime;
extern vec4 porousRoomRect;
extern vec2 porousDirection;
extern number porousDepth;
float porousWave(vec2 point) {
float broad = sin(point.x * 0.095 + point.y * 0.071 + porousTime * 1.45);
float fine = sin(point.x * 0.231 - point.y * 0.187 - porousTime * 2.20);
return broad * 0.105 + fine * 0.050;
}
vec4 effect(vec4 color, Image texture, vec2 textureCoords, vec2 screenCoords) {
vec4 alternateView = Texel(texture, textureCoords) * color;
vec2 local = screenCoords - porousRoomRect.xy;
vec2 size = porousRoomRect.zw;
if (local.x < 0.0 || local.y < 0.0 || local.x > size.x || local.y > size.y)
return vec4(0.0);
float depth;
if (porousDirection.x > 0.5) depth = local.x;
else if (porousDirection.x < -0.5) depth = size.x - local.x;
else if (porousDirection.y > 0.5) depth = local.y;
else depth = size.y - local.y;
float towardSeam = 1.0 - smoothstep(0.0, porousDepth, depth);
// Animated fingers soften the fifty-fifty transition across the visible
// overlap while preserving the pixels of the real alternate room render.
float mask = smoothstep(0.18, 0.82, towardSeam + porousWave(screenCoords));
alternateView.a *= mask;
return alternateView;
}
]]
function drawGoopySprite(sprite, x, y, scale)
local w, h = sprite:getWidth(), sprite:getHeight()
local time = love.timer.getTime()