• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Elringus/SpriteGlow: A sprite glow effect for Unity game engine

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Elringus/SpriteGlow

开源软件地址:

https://github.com/Elringus/SpriteGlow

开源编程语言:

ShaderLab 58.7%

开源软件介绍:

Installation

Use UPM to install the package via the following git URL: https://github.com/Elringus/SpriteGlow.git#package or download and import SpriteGlow.unitypackage manually.

Description

The glow effect is achieved using sprite outline in HDR colors (applied via shader) and bloom post-processing.

Glow Intensity Glow Color

For the bloom effect Unity Post Processing Stack (PPS) is used. You can replace it with similar 3rd-party solutions.

The effect is compatible with the Universal Render Pipeline (URP, aka LWRP). Bloom should be configured via URP's own post-processing solution; don't forget to enable HDR in the pipeline asset settings.

Character sprite by Mikhail Pigichka.

FAQ

Can I use the effect with components other than SpriteRenderer (UI Image, Tilemap, etc)?

Not directly (after all, this is SpriteGlow), but it's possible if the component is using a shader similar to sprites (e.g UI objects, tilemaps and other "2D" stuff). For this you will have to create a material based on the Sprites/Outline shader and manually apply it to the component. You can then control all the glow parameters using the material editor. In the project you can find scenes with the examples for applying the effect to UI Button and a tilemap.

Why doesn't the glow appear?

Make sure:

  • A bloom post-processing effect is enabled (you can use any, eg the one from Unity's PPS). Be aware, that universal render pipeline (URP/LWRP) only supports built-in post-processing, third-party solutions (including PPS) won't work with it.

  • HDR is enabled for target platform and tier (Edit > Project Settings > Graphics):

  • Camera 'Allow HDR' is enabled:

  • You've set 'Glow Brightness' high enough:

Why does the glow appear on the whole image?

Make sure 'Threshold' value of the bloom image effect is set high enough. It's usually 1 to 1.5, depending on the bloom solution.

Why do I get a NullReferenceException in build?

Most likely the outline shader is not included to the build (it happens when none of the included assets reference SpriteGlow component directly). You can force-include the shader by assigning it to the "Always Included Shaders" in Edit -> Project Settings -> Graphics.

It's still not working!

Make sure you're using a compatible Unity version; supported versions per release are available on the releases page.

Download (clone) this repository and examine the example scenes, comparing them with your setup. Chances are, you've misconfigured something.

In case nothing of the above helps, check the active issues or open a new one. Don't forget to include the full error log, detailed information about your system, Unity version, package version and steps required to reproduce the issue.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap