Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Next, in your draw step - include a low opacity vertically flipped draw of your sprite at a position equally below sea level as your character is currently above sea level.
That's the bare basics: There are more nuanced ways of doing this too such as drawing ALL objects onto a surface that's sole purpose is to be rendered under water effects
Might as well mention that in my current attempt I'm using a "deco_water" object to draw reflected versions of all affected sprites onto a surface, apply a shader, then draw the surface at a high depth. In theory the only issue is that the reflected sprites' depths are negatives of what they should be
For reference: https://cdn.discordapp.com/attachments/664869553976901657/934149884691488768/unknown.png
Can you "sort" these objects while drawing them? If so, if we say that the depth of a non-reflected object is "-y - z", then the depth of a reflected object should be "-y + z" (not "+y + z" nor "+y - z"), I think.
I still think the best option will be with masking
Here, you're suggesting the middle "Vertically-flipped scene reflection", which doesn't look right compared to the "Proper scene reflection" on the right. In the latter, the green orb is northwest of the blue orb in the original scene and in the reflection.
The middle option would work in a 2D sidescroller, but not in anything resembling 3D.
What do you mean?
In this case just extend all your terrain manually (duplication, just like in 3D) and render that above your reflection object so they are obscured bu the terrain, and then render your primary object. (this is a brute force fast way and will run into problems if you have enough height that an object may appear into a different "lake")
Render order would be (all object reflections), (all terrain), (all reflectable objects)
You want something like, This, right? https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html
And here's an image of my attempt where the character is facing the water;[cdn.discordapp.com] however I end up ordering the reflections I don't see a way around having to make new sprites for everything like how you can only see his face in the reflection