Esempio n. 1
0
 public static void LinkTransformsTo(this IStandardTransformMaterial me, UniformBuffer <Matrix4x4>?projection = null, UniformBuffer <Matrix4x4>?view = null, UniformBuffer <Matrix4x4>?world = null)
 {
     if (projection != null)
     {
         me.Projection.Buffer = projection.Buffer;
     }
     if (view != null)
     {
         me.View.Buffer = view.Buffer;
     }
     if (world != null)
     {
         me.World.Buffer = world.Buffer;
     }
 }
Esempio n. 2
0
 public static void LinkTransformsTo(this IStandardTransformMaterial me, Camera camera)
 {
     me.Projection.BufferRange = camera.ProjectionRange;
     me.View.BufferRange       = camera.ViewRange;
 }
Esempio n. 3
0
 public static void LinkTransformsTo(this IStandardTransformMaterial me, IStandardTransformMaterial other)
 {
     me.Projection.Buffer = other.Projection.Buffer;
     me.View.Buffer       = other.View.Buffer;
     me.World.Buffer      = other.World.Buffer;
 }