-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
1 parent
042bc34
commit ce1a0f0
Showing
7 changed files
with
8 additions
and
21 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
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
Loading
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#version 450 | ||
|
||
uniform vec3 tint; | ||
#ifdef SPIRV | ||
uniform sampler2D gbufferD; // vulkan unit align | ||
#endif | ||
uniform sampler2D tex; | ||
|
||
in vec2 tex_coord; | ||
out vec4 frag_color; | ||
|
||
void main() { | ||
vec4 col = texture(tex, tex_coord); | ||
frag_color = vec4((col.rgb / col.a) * tint, col.a); | ||
float radius = 0.45; | ||
float thickness = 0.03; | ||
float dist = distance(tex_coord, vec2(0.5, 0.5)); | ||
float ring = smoothstep(radius - thickness, radius, dist) - | ||
smoothstep(radius, radius + thickness, dist); | ||
frag_color = vec4(tint, min(ring, 0.6)); | ||
} |
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