Class TexturedMeshUtils
- Namespace
- OmegaEngine.Graphics
- Assembly
- OmegaEngine.dll
Utility method for textured SlimDX.Direct3D9.Meshes.
public static class TexturedMeshUtils
- Inheritance
-
TexturedMeshUtils
- Inherited Members
Methods
GenerateNormals(Device, ref Mesh)
Generate normal vectors if not present and convert into PositionNormalBinormalTangentTextured format for shaders. Tangent and binormal data is left empty.
public static void GenerateNormals(Device device, ref Mesh mesh)
Parameters
device
DeviceThe SlimDX.Direct3D9.Device containing the mesh
mesh
MeshThe mesh to be manipulated
Remarks
Normal vectors are required for lighting.
GenerateTBN(Device, ref Mesh, bool)
Generate TBN (tangent, binormal and normal) vectors if not present and convert into PositionNormalBinormalTangentTextured format for shaders.
public static void GenerateTBN(Device device, ref Mesh mesh, bool weldVertexes = false)
Parameters
device
DeviceThe SlimDX.Direct3D9.Device containing the mesh
mesh
MeshThe mesh to be manipulated
weldVertexes
boolWeld vertexes before generating tangents. Useful for organic objects, stones, trees, etc. (anything with a lot of round surfaces). If a lot of single faces are not connected on the texture (e.g. rockets, buildings, etc.) do not use.
Remarks
TBN vectors are required for normal mapping.