TransformPro v1.1

TransformPro v1.1

TransformPro on the Asset Store

A much more advanced version of TransformPro is now available on the asset store!


Creating scenes in Unity can be a bit of a chore.The layout tools are functional, but somewhat lacking in features.

Nowhere is this more obvious than the Transform inspector. For the single most important and commonly edited component in the engine, the inspector certainly is bare bones.

In general use this is fine, but when doing a lot of intensive scene layout there are a number of situations that start to get annoying. Often I’ve found I’ve accidentally forgotten to reset the position of an empty game object before adding children to it, or moved a child object instead of the parent.

All of these things can be fixed of course, but I’ve found myself copying and pasting individual axis data, or changing the parent and spamming zeros into the transform editor more times than I care to remember.

To try and improve on this, I’ve written an editor extension, TransformPro.

Continue reading “TransformPro v1.1”

Weather Effects Shader – Ground Water

Weather Effects Shader – Ground Water

This shader will be making use of the height-blending / lerping shader include described on my previous blog. If you want to find out how that works it’s all covered here.

For many games a dynamic weather system is as important as a day night cycle. Sometimes this is just to provide randomised weather events to add variation, and other times this is part of a scripted event, or area based trigger. Whatever the reason for the effects, it’s important that the environment reacts to the weather.

This blog will be the first in a series creating a shader that adds various dynamic weather effects to surfaces. For this post, we’ll cover adding dynamic standing ground water to any surface. Everything covered in this post is available as a download at the end.

Continue reading “Weather Effects Shader – Ground Water”

Height-blending shader

Height-blending shader

Many of the shaders I find myself writing require some sort of blending between textures. The most common example of this is for terrain shaders, or shaders for terrain type objects. These are usually controller by a splat map, where each color channel dictates the amount of a given texture to use. Another reasonably common example is a model where this data is fed in through the vertex colors instead of a texture map. A rarer example is an effect where the blending is controlled by world position, or even procedural noise.

Everything here is written using C# or HLSL/Cg in Unity, but the maths and principal are valid for any DirectX or OpenGL engine.

In this post we’ll be looking at how to implement texture blending, starting with a basic linear blend and ending up with a fancy height-blended approach. There’s a cginc to download at the end so you can quickly and easily implement these effects into your own shaders.

Continue reading “Height-blending shader”