- if (renderState == 2) {\r
- if (distanceToBackside != 0) {\r
- // add translucency by amplifying color inverse to the thickness\r
- // (1 - diff) is part of the irradiance term,\r
- // if the light hits the object straight at 90°\r
- // most light is received\r
- result += objectColor * pow(powBase, powFactor / pow(distanceToBackside, 0.6)) * transmittanceScale * (1 - diff);\r
- }\r
+ if (distanceToBackside != 0) {\r
+ // add translucency by amplifying color inverse to the thickness\r
+ // (1 - diff) is part of the irradiance term,\r
+ // if the light hits the object straight at 90°\r
+ // most light is received\r
+ result += objectColor * pow(powBase, powFactor / pow(distanceToBackside, 0.6)) * transmittanceScale * (1 - diff);\r