diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-09-20 15:10:30 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-09-20 15:10:30 -0400 |
| commit | 37dd0adf200d21924d69fd3ee7f084916087ac1c (patch) | |
| tree | 323e14eda2d757d65355ef3139abd399869b99d4 /assets | |
| parent | 3a5ac5ce7a039a07f775aab6e37a423ddf9294ed (diff) | |
present fragment shader references sampler
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/shaders/present.frag | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/assets/shaders/present.frag b/assets/shaders/present.frag index 427468c..2a95989 100644 --- a/assets/shaders/present.frag +++ b/assets/shaders/present.frag @@ -1,10 +1,16 @@ #version 450 +layout (binding = 0) uniform sampler2D samplerColor; + layout (location = 0) in vec2 inUV; layout (location = 0) out vec4 outFragColor; void main() { - outFragColor = vec4(0, 0, 0, 1); + vec4 color = texture(samplerColor, inUV); + if (color.w == 0) { + discard; + } + outFragColor = color; } |
