GithubHelp home page GithubHelp logo

anmolbajajnet / spriteglow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elringus/sprite-glow

0.0 1.0 0.0 35.23 MB

A sprite glow effect for Unity game engine

License: MIT License

C# 77.78% ShaderLab 22.22%

spriteglow's Introduction

Download unitypackage

For Unity 2017.3 and later: SpriteGlow.unitypackage. Check releases for previous versions support.

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 is used. You can replace it with similar 3rd-party solutions.

The effect is compatible with the Lightweight Render Pipeline (HDR should be enabled 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 project is called SpriteGlow). It is only possible if the component is using a shader similar to sprites, e.g. , โ€œ2Dโ€ stuff such as UI objects, tilemaps, etc. To accomplish this, a material based on the Sprites/Outline shader must be created and manually applied to the component. Material editor can then be used to control all of the glow parameters. In the project, scenes with examples of applying the effect to UI Button or a tilemap can be found.

Why the glow doesn't appear?

Make sure:

  • A bloom post-processing effect is enabled (you can use any, eg the one from Unity's PPS)

  • 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 the glow appears 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 I get a NullReferenceException in build?

NullReferenceException error in build is likely due to the outline shader not being included to the build. This often happens when none of the included assets reference SpriteGlow component directly. The shader can be force-included by assigning it to the "Always Included Shaders" in Edit -> Project Settings -> Graphics.

It's still not working

Please check the active issues.

spriteglow's People

Contributors

anmolbajajnet avatar elringus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.