<p>I want to avoid IBL (image based lighting), however my scenes are way too dark - especially close-to-mirror like surfaces, which get little contributions from other direct light sources in the scene.</p>
<p>So I was thinking that I should add some sort of scene light - with single color defined in the scene. How do I calculate the contribution of such light based on normal and view directions, material albedo, roughness and metallness, and the scene color? Is there any standard or typical equation for that?</p>
<p>Note that I would like it view-dependant.</p>
<p>Edit:
<a href="https://i.sstatic.net/1O7CY.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1O7CY.jpg" alt="roughness/metallic balls" /></a>
All the balls in this picture should have approximately the same apparent brightness, but the smooth metal balls are way darker.</p>
<p>I am using smith+ggx brdf, possibly modified.
Here is the whole fragment shader: <a href="https://gist.github.com/malytomas/b882c27c324a4f27ff56780717c9e4b2#file-cage_shader_engine_standard-glsl_fragment-glsl-L347" rel="nofollow noreferrer">https://gist.github.com/malytomas/b882c27c324a4f27ff56780717c9e4b2#file-cage_shader_engine_standard-glsl_fragment-glsl-L347</a>
Line 347 is where I would like to add additional term to compensate for the absence of IBL.</p>

CC BY-SA 4.0
2023-03-02T09:26:51.340Z
Which BRDF are you using at the moment? Ambient light is independent of view and normals. It represents light that is homogeneously distributed in the world you are rendering. Have you ever taken a look at diffuse light? Its strength depends on the angle between the normal direction and the light direction. For view-dependent lighting like reflections, you should look at specular lighting. Can you show us your rendering result so we can see what seems to be missing?
Thomas
CC BY-SA 4.0
2023-03-02T10:43:37.983Z
@Thomas good idea - I have added a screenshot to the question.
Tomas
CC BY-SA 4.0
2023-03-04T16:10:09.593Z
Make sure you are not using a linear color space and that you are using gamma correction. Aside from better image quality, both of these will allow for brighter lightsources without color clipping. For your scene light, do you mean a hero light? Or do you mean some GI approximation?
Mathis
CC BY-SA 4.0
2023-03-05T17:14:09.860Z
@Mathis My rendering is gamma correct.
Hero light is like a spot light attached to the camera, right? I am using that (not in the picture above) and it is kind-of ok-ish.
Essentially, I am looking for an equation that calculates the amount of light that a metallic-smooth object receives from mirroring the scene. Something similar to how energy preservation equalizes between diffuse and specular. An equation that equalizes all three diffuse+specular+mirror. If that makes any sense...
I think GI would be too expensive for my use-case, same as IBL.
Tomas
<lighting><pbr><ibl>
replace IBL with single color - the lighting equation
Tomas
# replace IBL with single color - the lighting equation

(Asked by: username_0 on 2023-03-01)

I want to avoid IBL (image based lighting), however my scenes are way too dark - especially close-to-mirror like surfaces, which get little contributions from other direct light sources in the scene.

So I was thinking that I should add some sort of scene light - with single color defined in the scene. How do I calculate the contribution of such light based on normal and view directions, material albedo, roughness and metallness, and the scene color? Is there any standard or typical equation for that?

Note that I would like it view-dependant.

Edit:
[![roughness/metallic balls](https://i.sstatic.net/1O7CY.jpg)](https://i.sstatic.net/1O7CY.jpg)
All the balls in this picture should have approximately the same apparent brightness, but the smooth metal balls are way darker.

I am using smith+ggx brdf, possibly modified.
Here is the whole fragment shader: <https://gist.github.com/malytomas/b882c27c324a4f27ff56780717c9e4b2#file-cage_shader_engine_standard-glsl_fragment-glsl-L347>
Line 347 is where I would like to add additional term to compensate for the absence of IBL.

**Tags:** lighting, pbr, ibl

> **Comments:**
> **username_1**: Which BRDF are you using at the moment? Ambient light is independent of view and normals. It represents light that is homogeneously distributed in the world you are rendering. Have you ever taken a look at diffuse light? Its strength depends on the angle between the normal direction and the light direction. For view-dependent lighting like reflections, you should look at specular lighting. Can you show us your rendering result so we can see what seems to be missing?  
> **username_0**: @username_1 good idea - I have added a screenshot to the question.  
> **username_2**: Make sure you are not using a linear color space and that you are using gamma correction. Aside from better image quality, both of these will allow for brighter lightsources without color clipping. For your scene light, do you mean a hero light? Or do you mean some GI approximation?  
> **username_0**: @username_2 My rendering is gamma correct. Hero light is like a spot light attached to the camera, right? I am using that (not in the picture above) and it is kind-of ok-ish. Essentially, I am looking for an equation that calculates the amount of light that a metallic-smooth object receives from mirroring the scene. Something similar to how energy preservation equalizes between diffuse and specular. An equation that equalizes all three diffuse+specular+mirror. If that makes any sense... I think GI would be too expensive for my use-case, same as IBL.  

---

## 0 answers

