简体   繁体   English

'ComputeShader 不包含 SetMatrix 的定义'

[英]'ComputeShader does not contain a definition for SetMatrix'

Currently I am trying to follow this tutorial on ray tracing using compute shaders .目前,我正在尝试按照使用计算着色器进行光线追踪的本教程进行操作 I am trying to set the matrices for the compute shader using ComputeShader.SetMatrix(string name, Matrix4x4 val) , or in my case specifically, RayTracingShader.SetMatrix("_CameraToWorld", _camera.cameraToWorldMatrix);我正在尝试使用ComputeShader.SetMatrix(string name, Matrix4x4 val)设置计算着色器的矩阵,或者特别是在我的情况下, RayTracingShader.SetMatrix("_CameraToWorld", _camera.cameraToWorldMatrix); . .

However, I get the error 'ComputeShader does not contain a definition for SetMatrix' , even though this Unity page clearly indicates that it should be possible.但是,我收到错误'ComputeShader does not contain a definition for SetMatrix' ,即使这个 Unity 页面清楚地表明它应该是可能的。 I am also unable to find anyone on Google with similar problems.我也无法在 Google 上找到任何有类似问题的人。 I have just now updated Unity to version 5.5.4p4 Personal.我刚刚将 Unity 更新到 5.5.4p4 Personal 版本。 Before that it didn't work either.在此之前,它也不起作用。

Any help fixing this would be greatly appreciated.任何解决此问题的帮助将不胜感激。

Unity 5.5 does not define ComputeShader.SetMatrix . Unity 5.5 没有定义ComputeShader.SetMatrix

You need to update to a version of Unity where ComputeShader.SetMatrix exists.您需要更新到存在ComputeShader.SetMatrix的 Unity 版本。

It seems like it first arrived in 2017.3好像是2017.3初到的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM