13 float g = eta * eta - 1 + c * c;
18 float A = (g - c) / (g + c);
19 float B = (c * (g + c) - 1) / (c * (g - c) + 1);
20 result = 0.5 * A * A * (1 +
B *
B);
31 color cosi2 =
color(cosi * cosi);
32 color one =
color(1, 1, 1);
33 color tmp_f = eta * eta + k * k;
34 color tmp = tmp_f * cosi2;
35 color Rparl2 = (tmp - (2.0 * eta * cosi) + one) / (tmp + (2.0 * eta * cosi) + one);
36 color Rperp2 = (tmp_f - (2.0 * eta * cosi) + cosi2) / (tmp_f + (2.0 * eta * cosi) + cosi2);
37 return (Rparl2 + Rperp2) * 0.5;
42 float f0 = (eta - 1.0) / (eta + 1.0);
48 float sqrt_f0 =
sqrt(
clamp(f0, 0.0, 0.99));
49 return (1.0 + sqrt_f0) / (1.0 - sqrt_f0);
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
ccl_device_inline float2 fabs(const float2 a)
float ior_from_F0(float f0)
color fresnel_conductor(float cosi, color eta, color k)
float fresnel_dielectric_cos(float cosi, float eta)
float F0_from_ior(float eta)
ccl_device_inline int clamp(int a, int mn, int mx)