ShadowGun 体积光学习

本文介绍了如何使用ShadowGun技术在Unity中实现体积光效果,以提升场景深度和空间感。通过透明纹理的雾效面片替代全局雾,当摄像机接近时,光效渐隐,顶点收缩。详细阐述了体积光的概念,并提供了源码示例,展示了不同距离下的光柱效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文

Fog and volumetric light rays (Shader Blinking Godrays)

When you turn on the global fog in 3d engine, the framerate often drops below a usable level, especially on older mobile devices.

From a graphics point of view however, fog dramatically improves look of the environments, especially helping to perceive the depth and space of a scene. The solution we came up with is the use of simple mesh faces with a transparent texture (Fog planes) instead of global fog. Once a player comes too close to a fog plane, it fades out and moreover, vertices of the fog plane are pulled away (because even a fully transparent alpha surface still consumes lot of render time).

 

雾效和体积光

当你在3d引擎里面开启全局雾效时,帧率会下降到不可用的地步,特别实在一些较低性能的移动设备。

但是从效果上来看,雾效会丰富环境的展示,特别是展现场景的深度和空间上。我们提出的解决方案是用简单的网格面片(包含透明纹理如雾效面片)来代替全局雾效。当一个玩家(摄像机)靠近一个雾效面片时,它会淡出并且缩小顶点。因为一个完全透明的表面仍然会消耗大量渲染的时间。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值