Fix T47347: Z-pass defaults to zero

Use the same default value for Z-depth in the compositor as everywhere else.
This commit is contained in:
Campbell Barton 2016-02-08 13:36:41 +11:00
parent ba1ca9148d
commit f77110e789
Notes: blender-bot 2023-02-14 08:14:47 +01:00
Referenced by issue #47361, Pointiness bake artifact when using selected to active
Referenced by issue #47362, Massive loss of speed in new builds with Ambient Occlusion and Branched Path Tracing.
Referenced by issue #47347, Disabled Render Layers output a Z-value of 0.0, causing unexpected behaviour with compositing.
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ void RenderLayersDepthProg::executePixelSampled(float output[4], float x, float
float *inputBuffer = this->getInputBuffer();
if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
output[0] = 0.0f;
output[0] = 10e10f;
}
else {
unsigned int offset = (iy * this->getWidth() + ix);