//ComputeBuffer _V;
 void test()
 {
     /*var stat = RayTracingMeshRenderer.getStaticMeshes();//
      * _V = new ComputeBuffer(stat[0].V.Count, System.Runtime.InteropServices.Marshal.SizeOf(typeof(Vector3)));
      * _V.SetData(stat[0].V.ToArray());
      * RayTracingShader.SetBuffer(0, "_test_V", _V);*/
     RayTracingMeshRenderer.pushStaticMeshes(RayTracingShader);
     RayTracingMeshRenderer.pushTextures(RayTracingShader);
 }
Exemple #2
0
    // Start is called before the first frame update
    void Start()
    {
        RayTracingMeshRenderer.pushStaticMeshes(RayTracingShader);
        RayTracingMeshRenderer.pushTextures(RayTracingShader);

        var obs_ = RayTracingMeshRenderer.getObjectsToRender();

        foreach (var ele in obs_)
        {
            _transformsToWatch.Add(ele.transform);
        }
        var m = FindObjectsOfType <Mass>();

        bh_t.Clear();
        foreach (var ele in m)
        {
            bh_t.Add(ele.gameObject);
            _transformsToWatch.Add(ele.transform);
        }
    }