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 }