Browse Source

Format the new glsl programs

Panagiotis Christopoulos Charitos 7 years ago
parent
commit
4851f02db6

+ 1 - 4
shaders/ClusterLightCommon.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_CLUSTER_LIGHT_COMMON_GLSL
-#define ANKI_SHADERS_CLUSTER_LIGHT_COMMON_GLSL
+#pragma once
 
 #include <shaders/LightFunctions.glsl>
 #include <shaders/glsl_cpp_common/ClusteredShading.h>
@@ -112,5 +111,3 @@ layout(std430, ANKI_SS_BINDING(LIGHT_SET, LIGHT_SS_BINDING + 1)) readonly buffer
 {
 	U32 u_lightIndices[];
 };
-
-#endif

+ 1 - 4
shaders/Common.glsl

@@ -5,8 +5,7 @@
 
 // This file contains common code for all shaders. It's optional but it's recomended to include it
 
-#ifndef ANKI_SHADERS_COMMON_GLSL
-#define ANKI_SHADERS_COMMON_GLSL
+#pragma once
 
 // WORKAROUNDS
 #if defined(ANKI_VENDOR_NVIDIA)
@@ -73,5 +72,3 @@ const U32 UBO_MAX_SIZE = 16384u;
 #endif
 
 #define CALC_BITANGENT_IN_VERT 1
-
-#endif

+ 1 - 4
shaders/DepthAwareBlur.glsl

@@ -10,8 +10,7 @@
 // TEXTURE_SIZE
 // SAMPLE_COUNT (must be odd number)
 
-#ifndef ANKI_SHADERS_DEPTH_AWARE_BLUR_GLSL
-#define ANKI_SHADERS_DEPTH_AWARE_BLUR_GLSL
+#pragma once
 
 #include <shaders/Common.glsl>
 
@@ -138,5 +137,3 @@ void main()
 	out_color = color;
 #endif
 }
-
-#endif

+ 1 - 1
shaders/DepthDownscale.glslp

@@ -6,7 +6,7 @@
 #pragma anki mutator TYPE 0 1 // 0: write to depth&color, 1: write to depth
 #pragma anki mutator SAMPLE_RESOLVE_TYPE 0 1 2 // 0: average, 1: min, 2: max
 #pragma anki mutator COPY_TO_CLIENT 0 1
-	
+
 #pragma anki start vert
 #include <shaders/QuadVert.glsl>
 #pragma anki end

+ 1 - 4
shaders/DownscaleBlur.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_DOWNSCALE_BLUR_GLSL
-#define ANKI_SHADERS_DOWNSCALE_BLUR_GLSL
+#pragma once
 
 #include <shaders/Common.glsl>
 
@@ -51,5 +50,3 @@ void main()
 	imageStore(out_img, IVec2(gl_GlobalInvocationID.xy), Vec4(out_color, 0.0));
 #endif
 }
-
-#endif

+ 0 - 1
shaders/ExponentialShadowmappingResolve.glslp

@@ -71,4 +71,3 @@ void main()
 	out_color += sampleLinearDepth(in_uv + Vec2(-uvOffset.x, -uvOffset.y)) * BOX_WEIGHTS[2u];
 }
 #pragma anki end
-

+ 1 - 4
shaders/ForwardShadingCommonFrag.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_FORWARD_SHADING_COMMON_FRAG_GLSL
-#define ANKI_SHADERS_FORWARD_SHADING_COMMON_FRAG_GLSL
+#pragma once
 
 // Common code for all fragment shaders of BS
 #include <shaders/Common.glsl>
@@ -134,5 +133,3 @@ void fog(Vec3 color, F32 fogAlphaScale, F32 fogDistanceOfMaxThikness, F32 zVSpac
 
 	writeGBuffer(Vec4(color, zFeatherFactor * fogAlphaScale));
 }
-
-#endif

+ 1 - 4
shaders/ForwardShadingCommonVert.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_FORWARD_SHADING_COMMON_VERT_GLSL
-#define ANKI_SHADERS_FORWARD_SHADING_COMMON_VERT_GLSL
+#pragma once
 
 // Common code for all vertex shaders of FS
 #include <shaders/Common.glsl>
@@ -27,5 +26,3 @@ out gl_PerVertex
 {
 	Vec4 gl_Position;
 };
-
-#endif

+ 2 - 2
shaders/ForwardShadingFog.glslp

@@ -17,7 +17,7 @@
 
 layout(location = 0) out F32 out_zVSpace;
 
-void main() 
+void main()
 {
 	gl_Position = mvp * Vec4(in_position, 1.0);
 	out_zVSpace = (modelView * Vec4(in_position, 1.0)).z;
@@ -30,7 +30,7 @@ void main()
 
 layout(location = 0) in F32 in_zVSpace;
 
-void main() 
+void main()
 {
 	fog(fogColor, fogAlphaScale, fogDistanceOfMaxThikness, in_zVSpace);
 }

+ 3 - 4
shaders/ForwardShadingParticles.glslp

@@ -5,7 +5,6 @@
 
 #pragma anki descriptor_set 1
 
-
 #pragma anki mutator ANIMATED_TEXTURE 0 1
 #pragma anki mutator LIGHT 0 1
 
@@ -28,7 +27,7 @@ layout(location = 0) flat out F32 out_alpha;
 layout(location = 1) out Vec2 out_uv;
 layout(location = 2) out Vec3 out_worldPos;
 
-void main() 
+void main()
 {
 	out_uv = Vec2(gl_VertexID & 1, gl_VertexID >> 1);
 
@@ -46,7 +45,7 @@ layout(location = 0) flat in F32 in_alpha;
 layout(location = 1) in Vec2 in_uv;
 layout(location = 2) in Vec3 in_worldPos;
 
-void main() 
+void main()
 {
 #if ANIMATED_TEXTURE == 1
 	Vec4 texCol = readAnimatedTextureRgba(diffuseMapArr, animationPeriod, in_uv, anki_u_time);
@@ -57,7 +56,7 @@ void main()
 #if LIGHT
 	texCol.rgb = computeLightColor(texCol.rgb, in_worldPos);
 #endif
-	
+
 	Vec4 colScale = colorScale;
 	colScale.a *= in_alpha;
 	particleAlpha(texCol, colScale, colorBias);

+ 1 - 4
shaders/Functions.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_FUNCTIONS_GLSL
-#define ANKI_SHADERS_FUNCTIONS_GLSL
+#pragma once
 
 #include <shaders/Common.glsl>
 
@@ -377,5 +376,3 @@ F32 rayAabbIntersectionInside(Vec3 rayOrigin, Vec3 rayDir, Vec3 aabbMin, Vec3 aa
 	F32 distToIntersect = min(min(largestParams.x, largestParams.y), largestParams.z);
 	return distToIntersect;
 }
-
-#endif

+ 11 - 11
shaders/GBufferGeneric.glslp

@@ -37,7 +37,7 @@
 #pragma anki start vert
 #include <shaders/GBufferCommonVert.glsl>
 
-void main() 
+void main()
 {
 #if BONES
 	skinning();
@@ -45,7 +45,7 @@ void main()
 
 #if PASS == PASS_GB_FS
 	positionUvNormalTangent(mvp, rotationMat);
-	
+
 #	if PARALLAX
 	parallax(modelViewMat);
 #	endif
@@ -62,35 +62,35 @@ void main()
 {
 #if PASS == PASS_GB_FS
 #	if heightTex_DEFINED
-		Vec2 uv =  computeTextureCoordParallax(heightTex, in_uv, heightMapScale);
+	Vec2 uv = computeTextureCoordParallax(heightTex, in_uv, heightMapScale);
 #	else
-		Vec2 uv = in_uv;
+	Vec2 uv = in_uv;
 #	endif
 
 #	if diffTex_DEFINED
-		Vec3 diffColor = texture(diffTex, uv).rgb;
+	Vec3 diffColor = texture(diffTex, uv).rgb;
 #	endif
 
 #	if specTex_DEFINED
-		Vec3 specColor = texture(specTex, uv).rgb;
+	Vec3 specColor = texture(specTex, uv).rgb;
 #	endif
 
 #	if roughnessTex_DEFINED
-		F32 roughness = texture(roughnessTex, uv).r;
+	F32 roughness = texture(roughnessTex, uv).r;
 #	endif
 
 #	if metalTex_DEFINED
-		F32 metallic = texture(metalTex, uv).r;
+	F32 metallic = texture(metalTex, uv).r;
 #	endif
 
 #	if normalTex_DEFINED
-		Vec3 normal = readNormalFromTexture(normalTex, uv);
+	Vec3 normal = readNormalFromTexture(normalTex, uv);
 #	else
-		Vec3 normal = normalize(in_normal);
+	Vec3 normal = normalize(in_normal);
 #	endif
 
 #	if emissiveTex_DEFINED
-		Vec3 emission = texture(emissiveTex, uv).rgb;
+	Vec3 emission = texture(emissiveTex, uv).rgb;
 #	endif
 
 	writeRts(diffColor, normal, specColor, roughness, subsurface, emission, metallic);

+ 2 - 2
shaders/GBufferPost.glslp

@@ -76,7 +76,7 @@ void main()
 	U32 idxOffset;
 	{
 		U32 k = computeClusterK(u_clustererMagic, worldPos);
-		U32 clusterIdx = 
+		U32 clusterIdx =
 			k * (CLUSTER_COUNT_X * CLUSTER_COUNT_Y) + U32(in_clusterIJ.y) * CLUSTER_COUNT_X + U32(in_clusterIJ.x);
 
 		idxOffset = u_clusters[clusterIdx];
@@ -105,7 +105,7 @@ void main()
 
 		// Clamp the tex coords. Expect a border in the texture atlas
 		texCoords2 = saturate(texCoords2);
-	
+
 		// Read diffuse
 		Vec2 diffUv = mad(texCoords2, decal.m_diffUv.zw, decal.m_diffUv.xy);
 		Vec4 decalDiff = texture(u_diffDecalTex, diffUv);

+ 1 - 4
shaders/GaussianBlurCommon.glsl

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GAUSSIAN_BLUR_COMMON_GLSL
-#define ANKI_SHADERS_GAUSSIAN_BLUR_COMMON_GLSL
+#pragma once
 
 #include <shaders/Common.glsl>
 
@@ -36,5 +35,3 @@ const F32 WEIGHTS[STEP_COUNT + 1u] = {0.198596, 0.175713, 0.121703, 0.065984, 0.
 // It's BOX_WEIGHTS[0] for the a texels. BOX_WEIGHTS[1] for the b texels. BOX_WEIGHTS[2] for the c texels.
 // Note: BOX_WEIGHTS[0] + BOX_WEIGHTS[1] * 4 + BOX_WEIGHTS[2] * 4 == 1.0
 const Vec3 BOX_WEIGHTS = Vec3(0.25, 0.125, 0.0625);
-
-#endif

+ 1 - 1
shaders/Irradiance.glslp

@@ -45,7 +45,7 @@ void main()
 
 				Vec3 r = getCubemapDirection(ndc, f);
 				F32 lambert = dot(r, ri);
-				
+
 				if(lambert > 0.0)
 				{
 					Vec3 col = textureLod(u_envTex, Vec4(r, texArrIdx), ENV_TEX_MIP).rgb;

+ 2 - 2
shaders/LensFlareUpdateIndirectInfo.glslp

@@ -43,10 +43,10 @@ void main()
 	}
 	memoryBarrierShared();
 	barrier();
-	
+
 	// Project the flare
 	U32 flareIdx = gl_WorkGroupID.x;
-	Vec4 posClip =  u_mvp * u_flarePositions[flareIdx];
+	Vec4 posClip = u_mvp * u_flarePositions[flareIdx];
 	Vec3 posNdc = posClip.xyz / posClip.w;
 	F32 depth = posNdc.z;
 

+ 8 - 11
shaders/LightShading.glslp

@@ -78,7 +78,7 @@ void main()
 	U32 idxOffset;
 	{
 		U32 k = computeClusterK(u_clustererMagic, worldPos);
-		U32 clusterIdx = 
+		U32 clusterIdx =
 			k * (CLUSTER_COUNT_X * CLUSTER_COUNT_Y) + U32(in_clusterIJ.y) * CLUSTER_COUNT_X + U32(in_clusterIJ.x);
 
 		idxOffset = u_clusters[clusterIdx];
@@ -111,11 +111,8 @@ void main()
 
 		ANKI_BRANCH if(light.m_diffuseColorTileSize.w >= 0.0)
 		{
-			F32 shadow = computeShadowFactorOmni(frag2Light, 
-				light.m_radiusPad1.x, 
-				light.m_atlasTiles, 
-				light.m_diffuseColorTileSize.w,
-				u_shadowTex);
+			F32 shadow = computeShadowFactorOmni(
+				frag2Light, light.m_radiusPad1.x, light.m_atlasTiles, light.m_diffuseColorTileSize.w, u_shadowTex);
 			lambert *= shadow;
 		}
 
@@ -131,18 +128,18 @@ void main()
 
 		LIGHTING_COMMON_BRDF();
 
-		F32 spot = computeSpotFactor(
-			l, light.m_outerCosInnerCos.x, light.m_outerCosInnerCos.y, light.m_lightDirRadius.xyz);
+		F32 spot =
+			computeSpotFactor(l, light.m_outerCosInnerCos.x, light.m_outerCosInnerCos.y, light.m_lightDirRadius.xyz);
 
 		F32 shadowmapLayerIdx = light.m_diffuseColorShadowmapId.w;
 		ANKI_BRANCH if(shadowmapLayerIdx >= 0.0)
 		{
-			F32 shadow = computeShadowFactorSpot(
-				light.m_texProjectionMat, worldPos, light.m_lightDirRadius.w, u_shadowTex);
+			F32 shadow =
+				computeShadowFactorSpot(light.m_texProjectionMat, worldPos, light.m_lightDirRadius.w, u_shadowTex);
 			lambert *= shadow;
 		}
 
-		out_color += 
+		out_color +=
 			(diffC + specC) * light.m_diffuseColorShadowmapId.rgb * (att * spot * max(gbuffer.m_subsurface, lambert));
 	}
 

+ 6 - 6
shaders/Reflections.glslp

@@ -108,7 +108,7 @@ Vec4 doSslr(Vec3 r, Vec3 n, Vec3 viewPos, Vec2 uv, F32 depth, F32 roughness)
 	U32 j = gl_GlobalInvocationID.y & 1u;
 	const U32 STEPS_ARR[4] = U32[](6u, 25u, 13u, 18u);
 	U32 step = STEPS_ARR[l * 2u + j];
-	
+
 	// Iterate
 	Bool found = false;
 	Vec3 raySample;
@@ -141,7 +141,7 @@ Vec4 doSslr(Vec3 r, Vec3 n, Vec3 viewPos, Vec2 uv, F32 depth, F32 roughness)
 		}
 	}
 
-	//return Vec4(heatmap(F32(iterations) / F32(MAX_STEPS)), 1.0);
+	// return Vec4(heatmap(F32(iterations) / F32(MAX_STEPS)), 1.0);
 
 	if(found)
 	{
@@ -180,12 +180,12 @@ void readReflectionsAndIrradianceFromProbes(
 		// Compute blend weight
 		F32 blendWeight = computeProbeBlendWeight(worldPos, aabbMin, aabbMax, 0.2);
 		totalBlendWeight += blendWeight;
-		
+
 		// Sample reflections
 		Vec3 cubeUv = intersectProbe(worldPos, reflDir, aabbMin, aabbMax, probeOrigin);
 		Vec3 c = textureLod(u_reflectionsTex, Vec4(cubeUv, cubemapIndex), reflLod).rgb;
 		specIndirect += c * blendWeight;
-		
+
 		// Sample irradiance
 		cubeUv = intersectProbe(worldPos, normal, aabbMin, aabbMax, probeOrigin);
 		c = textureLod(u_irradianceTex, Vec4(cubeUv, cubemapIndex), 0.0).rgb;
@@ -267,7 +267,7 @@ void main()
 		// Skip decals
 		U32 count = u_lightIndices[idxOffset++];
 		idxOffset += count;
-		
+
 		// Skip point lights
 		count = u_lightIndices[idxOffset++];
 		idxOffset += count;
@@ -305,7 +305,7 @@ void main()
 	Bool pickRightNeighbour = (fixedInvocationId.y & 1) == 0;
 #endif
 	I32 xOffset = (pickRightNeighbour) ? 1 : -1;
-	
+
 	readPixel.x = I32(gl_LocalInvocationID.x) + xOffset;
 	readPixel.x = clamp(readPixel.x, 0, I32(WORKGROUP_SIZE.x - 1));
 

+ 8 - 8
shaders/TemporalAAResolve.glslp

@@ -34,17 +34,17 @@ layout(ANKI_UBO_BINDING(0, 0), std140, row_major) uniform u0_
 };
 
 #if TONEMAP_FIX
-#define TONEMAPPING_SET 0
-#define TONEMAPPING_BINDING 1
-#include <shaders/TonemappingResources.glsl>
+#	define TONEMAPPING_SET 0
+#	define TONEMAPPING_BINDING 1
+#	include <shaders/TonemappingResources.glsl>
 #endif
 
 #if YCBCR
-#define sample(s, uv) rgbToYCbCr(textureLod(s, uv, 0.0).rgb)
-#define sampleOffset(s, uv, x, y) rgbToYCbCr(textureLodOffset(s, uv, 0.0, IVec2(x, y)).rgb)
+#	define sample(s, uv) rgbToYCbCr(textureLod(s, uv, 0.0).rgb)
+#	define sampleOffset(s, uv, x, y) rgbToYCbCr(textureLodOffset(s, uv, 0.0, IVec2(x, y)).rgb)
 #else
-#define sample(s, uv) textureLod(s, uv, 0.0).rgb
-#define sampleOffset(s, uv, x, y) textureLodOffset(s, uv, 0.0, IVec2(x, y)).rgb
+#	define sample(s, uv) textureLod(s, uv, 0.0).rgb
+#	define sampleOffset(s, uv, x, y) textureLodOffset(s, uv, 0.0, IVec2(x, y)).rgb
 #endif
 
 Vec3 sharpen()
@@ -106,7 +106,7 @@ void main()
 #elif TONEMAP_FIX
 	F32 lum0 = computeLuminance(tonemap(crntCol, u_exposureThreshold0));
 	F32 lum1 = computeLuminance(tonemap(historyCol, u_exposureThreshold0));
-	//F32 maxLum = computeLuminance(tonemap(boxMax, u_exposureThreshold0));
+	// F32 maxLum = computeLuminance(tonemap(boxMax, u_exposureThreshold0));
 	F32 maxLum = 1.0;
 #else
 	F32 lum0 = computeLuminance(crntCol);

+ 0 - 1
shaders/Ui.glslp

@@ -3,7 +3,6 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-
 #pragma anki mutator TEXTURE_TYPE 0 1 // 0: no tex, 1: rgba tex
 
 #pragma anki start vert

+ 6 - 10
shaders/VolumetricFog.glslp

@@ -65,11 +65,8 @@ Vec3 computeLightColor(Vec3 fragPos, U32 plightCount, U32 plightIdx, U32 slightC
 #if ENABLE_SHADOWS
 		if(light.m_diffuseColorTileSize.w >= 0.0)
 		{
-			factor *= computeShadowFactorOmni(frag2Light, 
-				light.m_radiusPad1.x, 
-				light.m_atlasTiles,
-				light.m_diffuseColorTileSize.w,
-				u_shadowTex);
+			factor *= computeShadowFactorOmni(
+				frag2Light, light.m_radiusPad1.x, light.m_atlasTiles, light.m_diffuseColorTileSize.w, u_shadowTex);
 		}
 #endif
 
@@ -85,15 +82,14 @@ Vec3 computeLightColor(Vec3 fragPos, U32 plightCount, U32 plightIdx, U32 slightC
 
 		Vec3 l = normalize(frag2Light);
 
-		factor *= computeSpotFactor(
-			l, light.m_outerCosInnerCos.x, light.m_outerCosInnerCos.y, light.m_lightDirRadius.xyz);
+		factor *=
+			computeSpotFactor(l, light.m_outerCosInnerCos.x, light.m_outerCosInnerCos.y, light.m_lightDirRadius.xyz);
 
 #if ENABLE_SHADOWS
 		F32 shadowmapLayerIdx = light.m_diffuseColorShadowmapId.w;
 		if(shadowmapLayerIdx >= 0.0)
 		{
-			factor *= computeShadowFactorSpot(
-				light.m_texProjectionMat, fragPos, light.m_lightDirRadius.w, u_shadowTex);
+			factor *= computeShadowFactorSpot(light.m_texProjectionMat, fragPos, light.m_lightDirRadius.w, u_shadowTex);
 		}
 #endif
 
@@ -196,7 +192,7 @@ void main()
 	// Read history
 	F32 historyFeedback;
 	Vec3 history = readHistory(ndc, historyFeedback);
-	
+
 	// Fix ghosting
 	history = max(history, newCol);
 

+ 1 - 4
shaders/glsl_cpp_common/ClusteredShading.h

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GLSL_CPP_COMMON_CLUSTERED_SHADING_H
-#define ANKI_SHADERS_GLSL_CPP_COMMON_CLUSTERED_SHADING_H
+#pragma once
 
 #include <shaders/glsl_cpp_common/Clusterer.h>
 
@@ -69,5 +68,3 @@ struct Decal
 const U32 SIZEOF_DECAL = 3 * SIZEOF_VEC4 + SIZEOF_MAT4;
 
 ANKI_END_NAMESPACE
-
-#endif

+ 1 - 4
shaders/glsl_cpp_common/Clusterer.h

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GLSL_CPP_COMMON_CLUSTERER_H
-#define ANKI_SHADERS_GLSL_CPP_COMMON_CLUSTERER_H
+#pragma once
 
 #include <shaders/glsl_cpp_common/Common.h>
 
@@ -46,5 +45,3 @@ ANKI_SHADER_FUNC_INLINE F32 computeClusterFar(ClustererMagicValues magic, U32 k)
 }
 
 ANKI_END_NAMESPACE
-
-#endif

+ 1 - 4
shaders/glsl_cpp_common/Common.h

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GLSL_CPP_COMMON_COMMON_H
-#define ANKI_SHADERS_GLSL_CPP_COMMON_COMMON_H
+#pragma once
 
 //
 // Macros & functions
@@ -54,5 +53,3 @@ const U32 SIZEOF_VEC4 = 4u * 4u;
 const U32 SIZEOF_MAT4 = 4u * SIZEOF_VEC4;
 
 ANKI_END_NAMESPACE
-
-#endif

+ 1 - 4
shaders/glsl_cpp_common/LensFlareSprite.h

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GLSL_CPP_COMMON_LENS_FLARE_SPRITE_H
-#define ANKI_SHADERS_GLSL_CPP_COMMON_LENS_FLARE_SPRITE_H
+#pragma once
 
 #include <shaders/glsl_cpp_common/Common.h>
 
@@ -19,5 +18,3 @@ struct LensFlareSprite
 };
 
 ANKI_END_NAMESPACE
-
-#endif

+ 1 - 4
shaders/glsl_cpp_common/TraditionalDeferredShading.h

@@ -3,8 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#ifndef ANKI_SHADERS_GLSL_CPP_COMMON_TRADITIONAL_DEFERRED_SHADING_H
-#define ANKI_SHADERS_GLSL_CPP_COMMON_TRADITIONAL_DEFERRED_SHADING_H
+#pragma once
 
 #include <shaders/glsl_cpp_common/Common.h>
 
@@ -46,5 +45,3 @@ const UVec2 GBUFFER_RT2_BINDING = UVec2(0, 2);
 const UVec2 GBUFFER_DEPTH_BINDING = UVec2(0, 3);
 
 ANKI_END_NAMESPACE
-
-#endif

+ 2 - 2
src/anki/renderer/Indirect.cpp

@@ -176,8 +176,8 @@ Error Indirect::initIrradiance(const ConfigSet& config)
 Error Indirect::initIrradianceToRefl(const ConfigSet& cfg)
 {
 	// Create program
-	ANKI_CHECK(m_r->getResourceManager().loadResource(
-		"shaders/ApplyIrradianceToReflection.glslp", m_irradianceToRefl.m_prog));
+	ANKI_CHECK(
+		m_r->getResourceManager().loadResource("shaders/ApplyIrradianceToReflection.glslp", m_irradianceToRefl.m_prog));
 
 	const ShaderProgramResourceVariant* variant;
 	m_irradianceToRefl.m_prog->getOrCreateVariant(variant);

+ 1 - 1
src/anki/resource/ShaderProgramPreProcessor.h

@@ -192,7 +192,7 @@ private:
 		const StringAuto* begin, const StringAuto* end, CString line, CString fname);
 
 	void tokenizeLine(CString line, DynamicArrayAuto<StringAuto>& tokens);
-	
+
 	static Bool tokenIsComment(CString token)
 	{
 		return token.getLength() >= 2 && token[0] == '/' && (token[1] == '/' || token[1] == '*');

+ 0 - 1
src/anki/resource/ShaderProgramResource.cpp

@@ -48,7 +48,6 @@ Bool ShaderProgramResourceInputVariable::acceptAllMutations(
 		{
 			// The value is 1
 			varValues[varCount] = 1.0;
-
 		}
 
 		vars[varCount] = {mutator.getName().cstr(), &varValues[varCount], 0, 0};

+ 1 - 1
tools/count_lines.sh

@@ -1 +1 @@
-wc -l `find ./src ./tests ./sandbox ./tools ./shaders ./programs ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.py' -o -name '*.ankiprog'`
+wc -l `find ./src ./tests ./sandbox ./tools ./shaders ./programs ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.py' -o -name '*.glslp'`

+ 1 - 1
tools/format_source.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-files=(`find ./src ./tests ./sandbox ./tools ./shaders ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl'`)
+files=(`find ./src ./tests ./sandbox ./tools ./shaders ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.glslp'`)
 
 filecount=${#files[@]}