Last active
February 10, 2021 14:44
-
-
Save Trass3r/8429ba646308854a528919a7f1b3bf4b to your computer and use it in GitHub Desktop.
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
#version 460 | |
#extension GL_KHR_shader_subgroup_vote: require | |
layout (location = 0) in float lightDistanceSqared; | |
layout (location = 0) out vec4 fragColor; | |
void main() | |
{ | |
const int radius = 5; | |
#if 0 | |
if (lightDistanceSqared <= radius*radius) | |
#else | |
if (subgroupAny(lightDistanceSqared <= radius*radius)) | |
#endif | |
{ | |
fragColor = vec4(0.1.xxx, 1.0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment