An alternative triplanar technique that produces sharper masks and does not require 3 texture samples to work if you don't need them. This makes it cheaper if you only need to tile 1 texture, since the uvs will be constructed correctly prior to sampling (no need to mask things off and sample another texture to cover up bad projections).
I left the textures the way they were though for demo purposes. Sampling a single texture would just be a matter of removing the masking and sampling single textures with the constructed uvs.
I left the textures the way they were though for demo purposes. Sampling a single texture would just be a matter of removing the masking and sampling single textures with the constructed uvs.
Maya CGFX File:
phongnormaltriplanar2.cgfx |
Unity SHADER File:
phongnormaltriplanar2.shader |