Randomized Tiling for Unity ShaderGraph
Перейти к файлу
Chris Tchou 404798a812
Update README.md
2020-09-09 11:41:07 -07:00
.images New images 2020-09-09 11:33:10 -07:00
Editor Added disable randomization option to SampleMaterialWithRandomTiling 2020-09-08 10:23:15 -07:00
Examples Added disable randomization option to SampleMaterialWithRandomTiling 2020-09-08 10:23:15 -07:00
Editor.meta Added disable randomization option to SampleMaterialWithRandomTiling 2020-09-08 10:23:15 -07:00
Examples.meta Added disable randomization option to SampleMaterialWithRandomTiling 2020-09-08 10:23:15 -07:00
README.md Update README.md 2020-09-09 11:41:07 -07:00
README.md.meta Added disable randomization option to SampleMaterialWithRandomTiling 2020-09-08 10:23:15 -07:00

README.md

Tiling Randomization

Randomized Tiling for Unity ShaderGraph Works with: 2019.4 LTS, 2020.1, 2020.2

Get rid of tiling artifacts in your shaders by randomizing the tiling.

Before: Standard Tiling

After: Randomized Tiling

How it's done:

Split the UV plane into three groups of hexagons, here colored red, green and blue. Hexes: Tiling Regions

Each hexagon chooses a unique randomized tiling. Here we display the random values of each hex tile. Random: Per-Tile Random Values

We blend the hexagons together. Any pixel fragment only has to consider three neighboring hexagons, one from each of the three groups.

The relative cost, compared to a regular tiling texture fetch, is is a bit of math (which is largely "free" on modern GPUs) and three texture fetches, one for each of the neighboring hexagons.