Skip to content

sprite geometry clipping for water effect#6804

Closed
Peptide90 wants to merge 1 commit into
space-wizards:masterfrom
Peptide90:water_sprite_changes
Closed

sprite geometry clipping for water effect#6804
Peptide90 wants to merge 1 commit into
space-wizards:masterfrom
Peptide90:water_sprite_changes

Conversation

@Peptide90

Copy link
Copy Markdown
Contributor

This is a PR necessary for my downstream fork. It allows the clipping of sprite geometry and in our case is an improvement over the FloorOccluder component to allow hiding parts of the players sprite without the need for rendering a sprite over the player.

Here is an example in action where we have a bobbing effect where the sprite cut is moving up and down.

Content.Client_gvD9IyYQRC.mp4

@Peptide90
Peptide90 requested a review from DrSmugleaf as a code owner July 16, 2026 10:33
@metalgearsloth

Copy link
Copy Markdown
Contributor

This looks like it'd be better off as a shader as the clipping is arbitrary?

@Peptide90

Copy link
Copy Markdown
Contributor Author

This looks like it'd be better off as a shader as the clipping is arbitrary?

Hey MGS, there is already a water clipping shader but we only support one post shader currently, so water clipping as a post-shader competes with effects such as outlines, invisibility, status effects, tinting, or anything else using PostShader.

Geometry clipping directly crops each layer’s quad and texture region, giving consistent proportions compared to doing it in content. I think this was the simplest way I could do this unless we decide to support post shader chaining.

@metalgearsloth

Copy link
Copy Markdown
Contributor

I think this was the simplest way I could do this unless we decide to support post shader chaining.

PostShader is better as this targeted at only 1 fork. You wouldn't see this kind of thing in a normal game engine like godot or unity which is what RT should be compared to.

@Peptide90

Copy link
Copy Markdown
Contributor Author

I think this was the simplest way I could do this unless we decide to support post shader chaining.

PostShader is better as this targeted at only 1 fork. You wouldn't see this kind of thing in a normal game engine like godot or unity which is what RT should be compared to.

So is post shader chaining what you want me to do or do I just use a regular post shader and forego the other shaders?

@metalgearsloth

Copy link
Copy Markdown
Contributor

Chaining would be better I would think.

@deltanedas

Copy link
Copy Markdown
Contributor

related to post shaders, there is 0 api for rendering a sprite with a post shader. its all done by clyde internally so you cant do anything in overlays etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants