Graphics Reference
In-Depth Information
Figure 3.9. Picking up more material than despositing allows for washing away material
(left: before, right: after). [Appeared in [Gunther et al. 12] and reproduced by kind
permission of the Eurographics Association.]
float4 transferRate ( float4 surfaceMat , float4 gammaMat )
{ float4 delta =
surfaceMat ￿ (1 g_pickUpRatio )
gammaMat ￿
g_pickUpRatio ;
return delta ￿ g_volatileness ;
}
Listing 3.5. Determination of transfer rates for four materials at once.
Transport from gammaton to atlas. In order to transfer material from the gam-
matons into the atlas, we expand all gammatons that hit a surface to quads and
splat the transferred material into the material atlas textures, using multiple ren-
der targets. The procedure is outlined in Listing 3.6. An issue to deal with is the
varying area covered by texels of the atlas texture, since more space is reserved for
detailed areas. To ensure that splats are equally sized in world space, we scale the
quads in the geometry shader by the aforementioned, precomputed texel-to-world
scale . Note that the clamping to the original material (last line in Listing 3.6)
preserves the original material on the surface. This prevents the material from
being washed away completely and thus continuously provides material input to
the aging simulation.
Transport from atlas to gammaton. The gammaton material is updated afterwards
in a separate transform feedback pass by feeding the gammatons into the ren-
Search WWH ::




Custom Search