Sprite brightness/highlight manipulation #13138
-
First of all I would like to thank all the (Why) Original issue / use case scenarioI was trying to "highlight" 2D sprites on mouse hover for a WhatNote: I have never worked on rendering in the past and I do not have much knowledge in the area, I am seeking some help understanding and making decent software design choices as well as contributing if the need surfaces. Here are the key points I would need help with:
Thank you for taking the time to read this. ReferencesReference 1: Current builtin Sprite color modifier behaviorSpriteColorPicker.webmReference 2: Desired behaviorSpriteHighlight.webm |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
As you mentioned, highlight.mp4 |
Beta Was this translation helpful? Give feedback.
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 ofSprite
, consider usingMaterial2d
. I provide an implementation for you (see attached file). In this example, I've created a custom highlight shader and applied it within aMaterialMesh2dBundle
.material2d_example.zip
highlight.mp4