UE4. Adding dithering to texcoord. How to add noise evenly spreaded?

ue4

#1

Hi guys :slight_smile:

So… dithering. Maybe there some easy way to add noise to texcoord evenly spreaded? Imagine it as a noisey blur added to texcoord (texture).
I understand what it can be done by using multiples noise textures, but… maybe there some more easiest way?


#2

Can you be more specific in what you mean by “evenly spreaded”? Are you talking about having the noise by consistently scaled across the entire surface of an object? The easiest solution is to not use the texcoord at all and instead use a 3D noise based on the object space position.


#3

“Evenly spreaded” - in every direction.
Let call dither added to texcoord - “blur”. Cause it looks like kind of noisy blur.
Now imagine how gaussian blur filter from photoshop works. It spread pixels evenly in every directions.


#4

So you’re looking to add noise to a texcoord to simulate a noisy blurring of a texture? If you want it to “blur” evenly in all directions, you can only guarantee the blur is even in UV space. If you’re applying this in an object’s material, there’s no way to have screen, or even world space consistent blurs since there’s no way to know what color is in a texcoord at a specific screen or world position outside of the triangle currently being rendered. The best you can get is it to be an even blur across the model by being careful with your UV mapping to try to keep the UVs as consistent as possible, but you’ll get artifacts anywhere there’s a UV seam as there’s no way to detect those in the shader.

If this is a screen space effect, then you just need to scale one axis of the texcoord offset by the screen’s aspect ratio.