为什么Unity着色器在编辑器游戏模式下为粉红色,但在编辑器场景模式下是正确的?
我正在使用通用渲染管道,我构建了一个显然效果很好的着色器。
当我设置_cameraopaquetext for for the Sharder时,我开始遇到此问题。 我在管道设置中启用了不透明的纹理。
我还尝试使用正确连接到相机的渲染纹理,但结果是相同的。
我试图在项目设置中包含着色器,尝试使用不同的摄像机,禁用后处理,但结果仍然相同。
你们是否有提示如何解决此问题?
任何帮助都非常感谢
I am using Universal Render Pipeline, I built a shader which apparently works good.
here is the image showing the result, please note that I am in the scene tab
here is the image showing the result in the game tab
I started getting this problem when I set _CameraOpaqueTexture for the shader.
I enabled opaque textures in the pipeline settings.
I also tried to use a render texture correctly connected to a camera but result is the same.
I tried to include the shader in the project settings, tried using different cameras, disable post processing but the result is still the same.
Do you guys have an hint on how to fix this problem?
Any help is much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现问题是什么,在我的着色器中,我正在使用这些功能:
然后:
我不知道为什么使用这些功能不起作用,也许是我身边的错误,但是避免了这些功能,我实际上可以看到我的着色器在游戏中。
I Found what the problem is, in my shader I was using these functions:
and then:
I don't know exactly why using these is not working, maybe is a mistake by my side, but avoiding those functions I can actually see my shader in game.