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.

Maya CGFX File:

phongnormaltriplanar2.cgfx
File Size: 9 kb
File Type: cgfx

Download File


Unity SHADER File:

phongnormaltriplanar2.shader
File Size: 12 kb
File Type: shader

Download File


Leave a Reply

Your email address will not be published. Required fields are marked *