public override void GetDrawCommand(DecalCamera dcam, ref Mesh mesh, ref Renderer renderer, ref int submesh, ref Material material, ref Matrix4x4 matrix) { base.GetDrawCommand(dcam, ref mesh, ref renderer, ref submesh, ref material, ref matrix); mesh = CubeMesh; }
/// <summary> /// Sets up a camera for decal rendering (may be called multiple times) /// </summary> /// <param name="cam"></param> protected virtual DecalCamera GetDecalCamera(Camera cam) { DecalCamera ret = cam.GetComponent <DecalCamera>(); if (ret.Exists()) { ret.enabled = true; } else { ret = cam.gameObject.AddComponent <DecalCamera>(); } return(ret); }
/// <summary> /// Sets <c>matrix</c> and <c>material</c> /// </summary> /// <inheritdoc /> public virtual void GetDrawCommand(DecalCamera dcam, ref Mesh mesh, ref Renderer renderer, ref int submesh, ref Material material, ref Matrix4x4 matrix) { matrix = DefaultMatrix(); material = DecalMaterial?.GetMaterial(ModeString); }