mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
Refactors immerse element to use alpha filters instead of static overlays (#93038)
## About The Pull Request Immerse element now uses an alpha filter rather than a vis_contents object, which allows them to be much more smooth and seamless. There's no longer a visible contour on fully opaque liquids, nor a janky effect when you move in a liquid. This also fixes the broken fluid animation, so now it actually has a bit of a wave to it. <img width="179" height="183" alt="dreamseeker_PDjP1zyMRl" src="https://github.com/user-attachments/assets/7c1bbefe-0e97-456e-a303-c34e6a1a238a" /> <img width="177" height="180" alt="dreamseeker_hGjKOyBL8f" src="https://github.com/user-attachments/assets/6c3bc33f-a22c-452a-beb0-9dd44b080a7c" /> <img width="152" height="162" alt="dreamseeker_Et3eRd3NF6" src="https://github.com/user-attachments/assets/1478aaba-d345-44de-8baa-9d0da0bc9d1c" /> <img width="185" height="182" alt="dreamseeker_5Iok1lUni2" src="https://github.com/user-attachments/assets/4ac5fea4-24a7-46c2-b475-4445a43493b4" /> The code is immensely cursed in some places, ideally this should not have to use vis_contents whatsoever but BYOND seems to be intent on causing memory leaks whenever you try to set mutable's render_target to an interpolated string, so I'm using a VIS_HIDE object as a relay for the filter for the time being. I've ended up changing some mob pixel_y offsets to pixel_z (as they should've been from the start) to account for this (the logic is being that pixel_y is "physical" position on the turf, while pixel_z is how high above the turf something is) ## Why It's Good For The Game The effect is less jank and looks cool. ## Changelog 🆑 refactor: Refactors immerse element to use alpha filters instead of static overlays. It should look much prettier now. /🆑
This commit is contained in:
@@ -185,7 +185,8 @@
|
||||
if(seat.buckle_lying && rider.body_position == LYING_DOWN)
|
||||
y_offset += (-1 * PIXEL_Y_OFFSET_LYING)
|
||||
|
||||
rider.add_offsets(RIDING_SOURCE, x_add = x_offset, y_add = y_offset, animate = animate)
|
||||
// Rider uses pixel_z offsets as they're above the turf, not up north on the turf
|
||||
rider.add_offsets(RIDING_SOURCE, x_add = x_offset, z_add = y_offset, animate = animate)
|
||||
rider.layer = layer
|
||||
|
||||
#undef GET_X_OFFSET
|
||||
|
||||
Reference in New Issue
Block a user