UV-Free Stretch-Free Triplanar Shader Pack

Version 1.0.2
by Andrew C. Wang

Note: The Unity 5 version of the shader pack, based on Unity's PBR Standard Shader technology, is coming very soon. The existing version 1.0.2 is for Unity 4.

Use this pack of terrain shaders and mesh shaders to eliminate terrain texture stretching, and easily texture objects beautifully without the need for skinning/UV-maps. Works great for procedurally generated geometry.

Unity Webplayer Demo Scene »

Unity Asset Store Page »

Release Notes & Changes

1.0.2:Fixed issue with strange lighting when DX11 is enabled for some graphics cards. Moved documentation to online HTML file.

1.0.1, 1.0.0: Initial Release. Note: Some graphics cards may be affect by a DX11 issue. As a workaround, disable the DX11 checkbox in the Build Settings > Player Settings until the 1.0.2 update is up on the Asset Store.

Features:

Shaders Included:

8 Triplanar Terrain shaders: Use as many textures as you want (4 texures per pass). Use these same way that Unity's built-in terrain shaders are used, but without the annoying stretching.

12 Global triplanar shaders: Shaders which map textures based on world/global position for static objects. Includes variations for single texture objects, two texture (top, side) objects, and 6 texture (top, bottom, left, right, front, back) objects.

12 Local triplanar shaders: Shaders which map textures based on local position moving objects. Includes variations for single texture objects, two texture (top, side) objects, and 6 texture (top, bottom, left, right, front, back) objects.

Additional Features:

Notes:

Tested on:

To Run The Example Scene:

  1. Import the UV-Free Stretch-Free Triplanar Shaders pack into your project.
  2. Open and run the UVFreeShaders/Example/demo scene.
  3. Use the onscreen buttons to choose from the Local, Global, or Terrain shaders demo, cycle through shaders and sample textures.
  4. Drag with Left Mouse to rotate model or terrain view. Drag with Right Mouse to rotate the direction of the light (indicated by the two parallel arrows). Move the mouse scroll wheel up/down to zoom. Press space to toggle the GUI.

Glossary of Shader Properties

Tint (RGB) Strength (A): This is a color tint that is applied to the texture.

Base (RGB) or Base (RGB) Gloss (A): The RGB channels are used for the diffuse texture. The alpha channel is used for the specular highlights. The higher the gloss, the shinier that part of the texture is.

Texture Power: The degree of blending for the different projections (top, bottom, left, right, front, back). A low texture power (1.0 - 5.0) will have more overlap and gradual blending, while a high texture power (10.0+) will have a sharper texture transition.

Normalmap: The normal map or bump map texture used for faking the lighting of bumps and dents. Make sure this texture is set configured as Texture Type "Normal map" when examining this texture in the inspector.

Normal multiplier: A setting which controls the bumpiness of the normalmap. The higher this is, the more exaggerated the bumps will be. At 0.0, the bumps from the normal map will be flattened out. A negative multiplier will turn the bumps inside out.

Top, Bottom, Left, Right, Front, Back, and Side textures and corresponding Normal Maps: For 2-texture shaders, the Top texture is used for the top (surfaces in the +Y direction) of the object, while the Side texture is used for the sides and bottom, with a Top multiplier to modify what is considered the "Top". For 6 Texture shaders, the different textures correspond to the textures projected to the surfaces facing the different directions.

Specular Color (RGB) Strength (A): The color and strength of the specular/gloss highlights.

Shininess: The shininess of the material. Lower values will have specular highlights that are more spread out, while higher values will have specular highlights that are more focused in a smaller area.

Specular Multiplier: This is an alternative to the Specular Color's strength. When this is zero, no specular highlights will be displayed. Crank this up past 1.0 to use with HDR.

Rim Color (RGB) Strength (A): Rim lighting gives the effect of the object being backlit or picking up bounce light. Rim color is the color of that bounce light.

Rim Power: The sharpness of the rim lighting. Lower values will cause the material's rim lighting to be spread out, while higher values will cause the rim lighting to be more concentrated.

Rim Multiplier: This is an alternative to the Rim Color's strength. When this is zero, no specular highlights will be displayed. As this increases above 1.0, the rim lighting will be exaggerated more and more.

Texture Scale %: For terrains, this is a quick way to scale all the textures for that terrain across the board simultaneously. Set this to smaller (<100.0) to shrink the textures, and larger (>100.0) to magnify the textures.

Support

Please contact me at andyman@idumpling.com with the subject "UV-Free Shaders".