Skip to content

Sprite brightness/highlight manipulation #13138

Answered by poporo89
vpochapuis asked this question in Q&A
Discussion options

You must be logged in to vote

As you mentioned, Sprite isn't suitable for your needs. Sprite multiplies colors like base_color * texture, but you require color addition, such as texture + highlight_color. Instead of Sprite, consider using Material2d. I provide an implementation for you (see attached file). In this example, I've created a custom highlight shader and applied it within a MaterialMesh2dBundle.

material2d_example.zip

highlight.mp4

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@vpochapuis
Comment options

@poporo89
Comment options

@vpochapuis
Comment options

Answer selected by vpochapuis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants