From c74d65cec84532d14d39be970438516c2b9f6c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 18 May 2020 10:56:22 +0200 Subject: GLSL: Change shader type specifier from [vertex] to #[vertex] The added `#` prevents clang-format from misinterpreting the meaning of this statement and thus messing up the formatting of the next lines up until the first `layout` statement. Similarly, a semicolon is now enforced on `versions` defines to prevent clang-format from messing up formatting and putting them all on a single line. Note: In its current state the code will ignore chained statements on a single line separated by a semicolon. Also removed some extraneous lines missed in previous style changes or added by mistake with said changes (e.g. after uniform definitions that clang-format messes up somewhat too, but we live with it). --- servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl') diff --git a/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl b/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl index db3043fb28..515cc35507 100644 --- a/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl +++ b/servers/rendering/rasterizer_rd/shaders/giprobe_debug.glsl @@ -1,5 +1,4 @@ -/* clang-format off */ -[vertex] +#[vertex] #version 450 @@ -11,12 +10,10 @@ struct CellData { uint emission; //rgb normalized with e as multiplier uint normal; //RGB normal encoded }; -/* clang-format on */ layout(set = 0, binding = 1, std140) buffer CellDataBuffer { CellData data[]; } - cell_data; layout(set = 0, binding = 2) uniform texture3D color_tex; @@ -37,7 +34,6 @@ layout(push_constant, binding = 0, std430) uniform Params { ivec3 bounds; uint pad; } - params; layout(location = 0) out vec4 color_interp; @@ -172,15 +168,13 @@ void main() { #endif } -/* clang-format off */ -[fragment] +#[fragment] #version 450 VERSION_DEFINES layout(location = 0) in vec4 color_interp; -/* clang-format on */ layout(location = 0) out vec4 frag_color; void main() { -- cgit v1.2.3