Exemplo n.º 1
0
 internal static void Draw(List <RenderTarget> destinations, Material material, bool useGeometryShader, int pass)
 {
     RenderTargetContext.SetRenderTargetContext(destinations);
     if (useGeometryShader)
     {
         material.SetPass(pass);
         #if UNITY_2019_1_OR_NEWER
         Graphics.DrawProceduralNow(MeshTopology.Points, 1);
         #else
         Graphics.DrawProcedural(MeshTopology.Points, 1);
         #endif
     }
     else
     {
         /*
          * GL.Clear(true, true, Color.clear);
          * GL.PushMatrix();
          * GL.LoadOrtho();
          * material.SetPass(pass);
          * GL.Begin(GL.TRIANGLE_STRIP);
          * GL.Vertex3(-1.0f, -1.0f, 0.1f);
          * GL.Vertex3(3.0f, -1.0f, 0.1f);
          * GL.Vertex3(-1.0f, 3.0f, 0.1f);
          * GL.End();
          * GL.PopMatrix();
          */
         material.SetPass(pass);
         Graphics.DrawMeshNow(screenMesh, Vector3.zero, Quaternion.identity);
     }
 }
 internal static void Draw(List <RenderTarget> destinations, Material material, bool useGeometryShader, int pass)
 {
     RenderTargetContext.SetRenderTargetContext(destinations);
     material.SetPass(pass);
     if (useGeometryShader)
     {
         #if UNITY_2019_1_OR_NEWER
         Graphics.DrawProceduralNow(MeshTopology.Points, 1);
         #else
         Graphics.DrawProcedural(MeshTopology.Points, 1);
         #endif
     }
     else
     {
         Graphics.DrawMeshNow(screenMesh, Vector3.zero, Quaternion.identity);
     }
 }
 internal static void Draw(List <RenderTarget> destinations, Material material, int pass)
 {
     RenderTargetContext.SetRenderTargetContext(destinations);
     material.SetPass(pass);
     Graphics.DrawMeshNow(screenMesh, Vector3.zero, Quaternion.identity);
 }