Game Development Reference
In-Depth Information
Step 1 - creating a texture blending shader
First, let's recognize the two-layer approach that's ideal here. First, we have the
brush source texture itself, which will be painted onto a destination texture when
the user clicks on a mesh in the scene, as shown here:
The brush texture, where black is transparent (alpha)
Then, we have the destination texture applied to the mesh onto which the brush
strokes should be overlaid when painted, as shown in the following screenshot:
Destination texture onto which brushes should be painted
However, we don't usually want the painted brush strokes overwriting or changing
the original destination texture during the paint operation. This is because the
destination texture could be applied to multiple objects in the scene (at least in
theory), and overwriting or changing the pixels of the original will result in its
effects being propagated to all objects using the texture.
 
Search WWH ::




Custom Search