-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
589 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://gcv6skd11wyl" | ||
path="res://.godot/imported/recording.png-2790dd51136d96a4591356310b44f14c.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Graphics/recording.png" | ||
dest_files=["res://.godot/imported/recording.png-2790dd51136d96a4591356310b44f14c.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
shader_type canvas_item; | ||
|
||
render_mode blend_add; | ||
uniform vec4 topleft:source_color; | ||
uniform vec4 topright:source_color; | ||
uniform vec4 bottomleft:source_color; | ||
uniform vec4 bottomright:source_color; | ||
uniform vec4 color:source_color; | ||
uniform vec4 topleft : source_color; | ||
uniform vec4 topright : source_color; | ||
uniform vec4 bottomleft : source_color; | ||
uniform vec4 bottomright : source_color; | ||
uniform vec4 color : source_color; | ||
uniform bool flipx; | ||
uniform bool flipy; | ||
|
||
// Define the range for the shader | ||
uniform vec2 range_min; | ||
uniform vec2 range_max; | ||
|
||
void fragment() { | ||
vec4 texture_color = texture(TEXTURE, UV); | ||
vec4 texture_color = texture(TEXTURE, UV); | ||
// Compute the gradient coordinates based on the range_min and range_max, and the flipx and flipy variables | ||
vec2 gradient_uv = (UV - range_min) / (range_max - range_min); | ||
if (flipx) { | ||
gradient_uv.x = 1.0 - gradient_uv.x; | ||
} | ||
if (flipy) { | ||
gradient_uv.y = 1.0 - gradient_uv.y; | ||
} | ||
|
||
vec4 top = mix(topleft, topright, gradient_uv.x); | ||
vec4 bottom = mix(bottomleft, bottomright, gradient_uv.x); | ||
vec4 gradient = mix(top, bottom, gradient_uv.y); | ||
vec4 mixed = gradient * color; | ||
|
||
// Compute the gradient coordinates based on the range_min and range_max, and the flipx and flipy variables | ||
vec2 gradient_uv = (UV - range_min) / (range_max - range_min); | ||
if (flipx) { | ||
gradient_uv.x = 1.0 - gradient_uv.x; | ||
} | ||
if (flipy) { | ||
gradient_uv.y = 1.0 - gradient_uv.y; | ||
} | ||
// Calculate the luminance of the pixel and use it as the alpha value | ||
float luminance = dot(texture_color.rgb, vec3(0.299, 0.587, 0.114)); | ||
mixed.a *= luminance; // Use luminance as alpha | ||
|
||
|
||
vec4 top = mix(topleft, topright, gradient_uv.x); | ||
vec4 bottom = mix(bottomleft, bottomright, gradient_uv.x); | ||
vec4 gradient = mix(top, bottom, gradient_uv.y); | ||
vec4 mixed = gradient * color; | ||
vec4 final_color = vec4(texture_color.rgb, texture_color.a); | ||
COLOR = final_color * mixed; | ||
} | ||
// Set the final color with the modified alpha value | ||
vec4 final_color = vec4(texture_color.rgb, texture_color.a); | ||
COLOR = final_color * mixed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.