Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
| Context not available. | |||||
| return cl; | return cl; | ||||
| } | } | ||||
| Closure closure_split(float lighting, Closure cl1, Closure cl2, float fac, float blur) | |||||
| { | |||||
| Closure cl; | |||||
| if(lighting > fac) { | |||||
| if(lighting < fac + blur) { | |||||
| float percent = clamp((lighting - fac) / ((fac + blur) - fac), 0.0, 1.0); | |||||
| cl.radiance = mix(cl2.radiance, cl1.radiance, percent); | |||||
| cl.opacity = cl1.opacity; | |||||
| } | |||||
| else { | |||||
| cl.radiance = cl1.radiance; | |||||
| cl.opacity = cl1.opacity; | |||||
| } | |||||
| } | |||||
| else { | |||||
| cl.radiance = cl2.radiance; | |||||
| cl.opacity = cl2.opacity; | |||||
| } | |||||
| return cl; | |||||
| } | |||||
| Closure closure_add(Closure cl1, Closure cl2) | Closure closure_add(Closure cl1, Closure cl2) | ||||
| { | { | ||||
| Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; | Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; | ||||
| Context not available. | |||||