curioustorvald / Terrarum

Modular game engine for a side-scrolling tilemap platformer, and a game that runs on top of it
Other
12 stars 0 forks source link

Tile breakage lets skybox pass thru if there's no backing wall #22

Closed curioustorvald closed 5 years ago

curioustorvald commented 5 years ago

It seems the shader's only changing alpha, instead of overlaying the colour

curioustorvald commented 5 years ago
vec4 finalColor = vec4(mix(finalTile.rgb, finalBreakage.rgb, finalBreakage.a), finalTile.a);

This also prevents cracks to "float" over the tile, as wen there's no pixel under the crack, crack itself also won't get drawn.