Is there any way to set pixel values of background to 0 when rendering? I want to set bg pixel values to 0 (black) but when I change the color of world, the pixel values of bg become more than 1 due to lights. When disabling lights, rendered image gets plain black image including my object. I am using blender 2.8.
Is there any way to set pixel values of background to 0 when rendering?
EDIT
I'm not using any effect on the world.
The rendered image background looks plain black but when checking it with python, it's not.


Here's the rounded 1s distribution. the white pixels were 1s.
As @no-can-do mentioned in the comments, you would have to go in the world part of the shader editor.
If you want to keep your environment light you can use a setting like the following.
&quot;Is camera ray&quot; will drive the background color.
If it is a ray from the camera (rendered), the value is 1 and the &quot;mix color&quot; will give black.
If it is not the value is 0, the ray will be from the texture and will light the scene.

Note: if you're not using accurate texture format (openEXR), you may have rounded RGB values (i.e: 0.000something becomes 1).