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/shaders/omnishadow.frag.glsl
Joshua Goins 3229c4fa2c Another big WebGPU compatibility patch
All specialization constants are removed (they cause trouble in
WebGPU, since they don't support array sizing, and it was a pain
in Metal anyway) - they are now macro defined. WebGPU now runs, although
push constant emulation is not implemented yet.
2022-03-07 00:33:44 -05:00

12 lines
310 B
GLSL

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);
}