Skip to content

Commit

Permalink
fix:fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed Jun 29, 2024
1 parent fd067ba commit d8f7d64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shaders/purple.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ void fragment() {
// Called for every pixel the material is visible on.
vec2 screen_coords = SCREEN_UV;
// 垂直翻转Y坐标
screen_coords.y = (1.0 - screen_coords.y);
screen_coords.y = (1.0 - screen_coords.y);
// 紫色
vec4 purple_color = vec4(0.5, 0.0, 0.5, 0.5);
vec4 purple_color = vec4(0.5, 0.0, 0.5, 0.5);
// 半透明紫色
vec4 transparent_purple = vec4(0.5, 0.0, 0.5, 0.1);
vec4 transparent_purple = vec4(0.5, 0.0, 0.5, 0.1);
vec4 gradient_color = purple_color + (transparent_purple - purple_color) * screen_coords.y * 3.6;
// 设置最终颜色
COLOR = gradient_color;
Expand Down

0 comments on commit d8f7d64

Please sign in to comment.