Added comment.
This commit is contained in:
parent
c5780dd8e2
commit
1cf5f4c899
@ -103,6 +103,14 @@ namespace PolyVox
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a material which is in some sense a weighted combination of the supplied materials.
|
||||
*
|
||||
* The Marching Cubes algotithm generates vertices which lie between voxels, and ideally the material of the vertex should be interpolated from the materials
|
||||
* of the voxels. In practice, that material type is often an integer identifier (e.g. 1 = rock, 2 = soil, 3 = grass) and an interpolation doean't make sense
|
||||
* (e.g. soil is not a combination or rock and grass). Therefore this default interpolation just return one material or the other, but if more advanced voxel
|
||||
* types do support interpolation then it can be implemented in this function.
|
||||
*/
|
||||
MaterialType blendMaterials(MaterialType a, MaterialType b, float weight)
|
||||
{
|
||||
if(weight < 0.5f)
|
||||
|
Loading…
x
Reference in New Issue
Block a user