Log In  

Cart #db_reflection-1 | 2021-10-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12


A simple demo of a reflection.

Press X to enable/disable the reflection effect.
Press Z to enable/disable the ripple effect.

Use up/down to move the view up and down i.e. change the amount of reflection on the screen.

Uses the extra palette to dim the portion of the screen where the reflection will be.
Draws everything else like normal above the reflection surface.
'memcopy's to the lines below the reflection surface, starting with the line immediately above it.
Adding an offset with some sin() calls moves each line a bit to allow the ripple effect. Downside is a little bit of mess at the edges.

[edit] Minor bug fix to make ripple effect constant with distance from the shore.

P#98701 2021-10-15 16:09 ( Edited 2021-10-15 16:57)


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-16 21:23:42 | 0.008s | Q:14