A question for #graphics programmers! I have a water surface with a pixelated lo...

@thomastc@mastodon.gamedev.place

A question for #graphics programmers!

I have a water surface with a pixelated look. Foam is added using a threshold into a noise texture. The threshold varies across the surface. The texture uses NN sampling, but the threshold (when passed in a varying from VS to FS) is interpolated linearly, causing pixels to be partially covered with foam. Not the look I want.

To fix this, I recompute the threshold in the FS based on a rounded position. It works, but it's too slow.

Any alternative ideas?