1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-23 14:03:13 +00:00
Pixelorama/src/Shaders/SilhouetteShader.gdshader
TheLsbt f515dbe57e
Add a silhouette option to reference images (#898)
* Added a silhoutte system to refrence images

* Added translations

* Fixed dialogs visibility

* SilhouetteShader.tres -> Silhouette.gdshader

* Update ReferenceImage.gd

Fixed the linter issue (mabey)

* Update PreferencesDialog.tscn

Copied the code from the Pixelorama's PrefrenceDialog.tscn to my fork.

* Update ReferenceImage.gd

Created a variable at the top of the script.

---------

Co-authored-by: TheLSBT1 <theflowcorporationofficial@gmail.com>
2023-08-15 01:56:43 +03:00

14 lines
No EOL
286 B
Text

shader_type canvas_item;
uniform vec4 silhouette_color: hint_color;
uniform bool show_silhouette;
void fragment() {
vec4 color = texture(TEXTURE, UV);
if (show_silhouette && color.a > 0.0) {
color.rgb = silhouette_color.rgb;
COLOR.rgb = color.rgb;
} else {
COLOR = color
}
}