Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/base/shaders/omnishadow.frag.glsl
Joshua Goins e68d6bceeb Fix a ton of issues in the Metal backend
* Remaining push constant issues should be phased out, more changes to
come regarding declaring shader resources to make it less error-prone,.
* Sampler creation is restored for create_texture, for now.
* EndRenderPass command type is now supported, to partially reset render
state when needed.
2022-06-27 14:10:31 -04:00

14 lines
362 B
GLSL

layout (constant_id = 0) const int max_lights = 4;
layout (location = 0) in vec3 inPos;
layout (location = 1) flat in int index;
layout (location = 0) out float outFragColor;
layout(std430, binding = 2) buffer readonly LightInformation {
vec4 light_locations[max_lights];
};
void main() {
outFragColor = length(inPos - light_locations[index].xyz);
}