diff options
| author | Patrick | 2021-03-26 20:13:19 +0100 |
|---|---|---|
| committer | Patrick | 2021-03-26 20:13:19 +0100 |
| commit | 54a47a42ce3f6f05eafd62305552ee48dc08913f (patch) | |
| tree | 6dba95d1071357d3e36a9be892ce44d83f722e3f /shaders/frag_irradiance.glsl | |
| parent | 0a5e8172a6ee0e79c81eec21a9966bea9385b249 (diff) | |
| download | subsurface_scattering-54a47a42ce3f6f05eafd62305552ee48dc08913f.tar.gz subsurface_scattering-54a47a42ce3f6f05eafd62305552ee48dc08913f.zip | |
remove debugging renderstate
Diffstat (limited to 'shaders/frag_irradiance.glsl')
| -rw-r--r-- | shaders/frag_irradiance.glsl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/shaders/frag_irradiance.glsl b/shaders/frag_irradiance.glsl index b985acf..2a7edec 100644 --- a/shaders/frag_irradiance.glsl +++ b/shaders/frag_irradiance.glsl @@ -40,14 +40,12 @@ void main() // thickness
float distanceToBackside = length(FragPos - Backside);
- if (renderState == 2) {
- if (distanceToBackside != 0) {
- // add translucency by amplifying color inverse to the thickness
- // (1 - diff) is part of the irradiance term,
- // if the light hits the object straight at 90°
- // most light is received
- result += objectColor * pow(powBase, powFactor / pow(distanceToBackside, 0.6)) * transmittanceScale * (1 - diff);
- }
+ if (distanceToBackside != 0) {
+ // add translucency by amplifying color inverse to the thickness
+ // (1 - diff) is part of the irradiance term,
+ // if the light hits the object straight at 90°
+ // most light is received
+ result += objectColor * pow(powBase, powFactor / pow(distanceToBackside, 0.6)) * transmittanceScale * (1 - diff);
}
FragColor = vec4(result, 1.0f);
|
