From bab5862383edbc530c4bc83a23f5a65a460c6c06 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 13 May 2019 21:15:10 +0200 Subject: [PATCH] - fix some vulkan warnings --- wadsrc/static/shaders/glsl/fogboundary.fp | 8 ++++++++ wadsrc/static/shaders/glsl/stencil.fp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/wadsrc/static/shaders/glsl/fogboundary.fp b/wadsrc/static/shaders/glsl/fogboundary.fp index 2a9c7adc0..9494a9ca9 100644 --- a/wadsrc/static/shaders/glsl/fogboundary.fp +++ b/wadsrc/static/shaders/glsl/fogboundary.fp @@ -1,5 +1,9 @@ layout(location=2) in vec4 pixelpos; layout(location=0) out vec4 FragColor; +#ifdef GBUFFER_PASS +layout(location=1) out vec4 FragFog; +layout(location=2) out vec4 FragNormal; +#endif //=========================================================================== // @@ -25,5 +29,9 @@ void main() } fogfactor = exp2 (uFogDensity * fogdist); FragColor = vec4(uFogColor.rgb, 1.0 - fogfactor); +#ifdef GBUFFER_PASS + FragFog = vec4(0.0, 0.0, 0.0, 1.0); + FragNormal = vec4(0.5, 0.5, 0.5, 1.0); +#endif } diff --git a/wadsrc/static/shaders/glsl/stencil.fp b/wadsrc/static/shaders/glsl/stencil.fp index f6bc4dad0..c2bb6fbfd 100644 --- a/wadsrc/static/shaders/glsl/stencil.fp +++ b/wadsrc/static/shaders/glsl/stencil.fp @@ -1,7 +1,15 @@ layout(location=0) out vec4 FragColor; +#ifdef GBUFFER_PASS +layout(location=1) out vec4 FragFog; +layout(location=2) out vec4 FragNormal; +#endif void main() { FragColor = vec4(1.0, 1.0, 1.0, 0.0); +#ifdef GBUFFER_PASS + FragFog = vec4(0.0, 0.0, 0.0, 1.0); + FragNormal = vec4(0.5, 0.5, 0.5, 1.0); +#endif }