mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-05 04:34:23 +02:00
Use shader include for fore/background shaders
The two shaders use a lot of common logic for co-ordinate and attribute look up, so it makes sense to use a common include shader for both. Adds support for the inverse and blink attributes to the foreground shader.
This commit is contained in:
parent
a849423096
commit
8b320622f9
5 changed files with 95 additions and 49 deletions
|
@ -1,7 +1,5 @@
|
|||
// SPDX-FileCopyrightText: 2024 Leroy Hopson <godot-xterm@leroy.nix.nz>
|
||||
// SPDX-License-Identifier: MIT
|
||||
shader_type canvas_item;
|
||||
|
||||
void fragment() {
|
||||
COLOR = texture(TEXTURE, UV);
|
||||
// TODO: Check blink attribute and hide/show using the below.
|
||||
//COLOR = vec4(0);
|
||||
}
|
||||
#define FOREGROUND
|
||||
#include "./common.gdshaderinc"
|
Loading…
Add table
Add a link
Reference in a new issue