From 6ac7c09d9083b7fe1261a3c566dcc4a7af061fc1 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 5 Feb 2023 22:16:28 -0400 Subject: [PATCH] shaders: default to std430 layout for storage buffers. --- src/modules/graphics/Shader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index eea1e4a95..f6c314420 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -136,6 +136,10 @@ static const char global_functions[] = R"( #endif #endif +#if __VERSION__ >= 430 || (defined(GL_ES) && __VERSION__ >= 310) + layout (std430) buffer; +#endif + #if __VERSION__ >= 130 && !defined(LOVE_GLSL1_ON_GLSL3) #define Texel texture #else