【发布时间】:2020-02-26 19:55:51
【问题描述】:
目前我正在尝试关注this tutorial on ray tracing using compute shaders。我正在尝试使用ComputeShader.SetMatrix(string name, Matrix4x4 val) 或在我的情况下特别是RayTracingShader.SetMatrix("_CameraToWorld", _camera.cameraToWorldMatrix); 为计算着色器设置矩阵。
然而,我得到了错误'ComputeShader does not contain a definition for SetMatrix',尽管this Unity page 清楚地表明它应该是可能的。我也无法在 Google 上找到任何有类似问题的人。我刚刚将 Unity 更新到 5.5.4p4 Personal 版本。在此之前它也不起作用。
任何解决此问题的帮助将不胜感激。
【问题讨论】:
标签: c# unity3d compute-shader