使像素照明像Terraria和Starbound [英] Make pixel lighting like terraria and starbound

查看:132
本文介绍了使像素照明像Terraria和Starbound的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作2D沙盒游戏,例如"Terraria"和"Starbound".这是我的游戏

I'm making a 2D sandbox game like "Terraria" and "Starbound". This is my game

光充满了整个地形,但我不想要它.我要关注:

The light is filling the whole terrain but i don't want it. I want following:

推荐答案

您可能正在使用定向照明",它可以按照您的方向均匀照明整个地形. 您可以使用聚光灯或点光源,它们只会照亮您想要的表面.

You're probably using Directional Lighting, which illuminates the whole terrain equally in the direction you made it. You could use Spot Lights or Point Lights, which will illuminate only the surface you want to.

尽管使用此方法,但是由于整个地图上放置的单个灯光的数量,这可能会占用更多资源.

although using this method, this could take way more resources due to the number of single lights placed throughout the map.

这篇关于使像素照明像Terraria和Starbound的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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