Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-03-10 18:09:22 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-03-10 20:05:01 +0300
commit7613ffc944ebc133f1f906ea737ab55718434cc4 (patch)
treee2c54a4b971fe955f4c7538db1fc086a997b8702 /intern/cycles/kernel/shaders/node_refraction_bsdf.osl
parent8a76f8dac3475b1d24956e0d384d65295f15c76a (diff)
Cycles: switch to squared roughness convention for all nodes.
This was already done for the Principled BSDF to be compatible with typical baked roughness maps in PBR workflows.
Diffstat (limited to 'intern/cycles/kernel/shaders/node_refraction_bsdf.osl')
-rw-r--r--intern/cycles/kernel/shaders/node_refraction_bsdf.osl5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
index 828becf1818..eaab7282243 100644
--- a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
@@ -26,12 +26,13 @@ shader node_refraction_bsdf(
{
float f = max(IOR, 1e-5);
float eta = backfacing() ? 1.0 / f : f;
+ float roughness = Roughness * Roughness;
if (distribution == "sharp")
BSDF = Color * refraction(Normal, eta);
else if (distribution == "beckmann")
- BSDF = Color * microfacet_beckmann_refraction(Normal, Roughness, eta);
+ BSDF = Color * microfacet_beckmann_refraction(Normal, roughness, eta);
else if (distribution == "GGX")
- BSDF = Color * microfacet_ggx_refraction(Normal, Roughness, eta);
+ BSDF = Color * microfacet_ggx_refraction(Normal, roughness, eta);
}