Unity 3D从一个天空盒淡入另一个天空盒 [英] Unity 3D fade from one skybox to another

查看:1237
本文介绍了Unity 3D从一个天空盒淡入另一个天空盒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有四个不同的天空盒,每个季节用于我的游戏中.

I have four different skyboxes, one for each season in my game.

如何在c#中的天空盒之间创建淡入淡出过渡?

How can I create a fade transition between the skyboxes in c#?

例如,在某个时刻,夏天的天空盒逐渐消失到秋天的天空盒中.

So for example, at a certain point, the summer skybox fades into the autumn skybox.

谢谢!

推荐答案

您将要在着色器中进行混合,其中有

You'll want to do the blending in a shader, there's one on the Unify wiki that can blend between two skyboxes.

当它们中的2个之间完成混合时,您需要使用脚本(使用material.SetTexture)交换材质中的纹理以获得4个之间的混合效果.

You need to swap the textures in your material using a script (using material.SetTexture) when it's finished blending between 2 of them to get the effect of blending between 4.

这篇关于Unity 3D从一个天空盒淡入另一个天空盒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆