mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.6K
active users

DavitM

Due procedural textures lacks of mipmaps, how to fix them in the material? Is to avoid in far view looks noisy.

All without use the TextureSample/Texture object trick.

Any idea?

@DavitMasia A simple approach is to fade out the pattern to average colour based on derivatives (DDX/DDY) of grid position - when the derivative approaches the size of your grid you reduce the amplitude of the pattern to 0.

For more complex solutions see:
bgolus.medium.com/the-best-dar

Medium · The Best Darn Grid Shader (Yet) - Ben Golus - MediumBy Ben Golus

@dougbinks Wow, very extensive, thanks!

@dougbinks I tried the shader it provides, but no idea why i get differnt visual if i look in X or Y axis ¿?.
In one axis the lines goes more fat, but they are stable, in other axis they looks as it should in distance but TAA makes some jazzing. I tried different quality settings but always same thing.

@DavitMasia If you're able to use Renderdoc this might help you debug why there is a difference. See dev.epicgames.com/documentatio for a guide.

@dougbinks Already found the issue, i had to use float2 , now all looks much better.

@DavitMasia
> procedural textures lacks of mipmaps

generate texture in buffer - generate mipmap for buffer - it is very cheap by performance and work every frame - this is best option

but it not always possible to make single texture from procedural - if it fractal-like stuff

for simple cases on your screenshot - iquilezles.org/articles/filter

for complex (worst by performance) - for loop 10x10 times per pixel for SSAA -
shadertoy.com/view/MdjGR1
shadertoy.com/view/4lXfzn

UnrealEngine - no idea