diff options
author | Pascal Schoen <pascal_schoen@gmx.net> | 2016-04-18 09:41:53 +0300 |
---|---|---|
committer | Pascal Schoen <pascal_schoen@gmx.net> | 2016-05-24 17:51:09 +0300 |
commit | d8fa169bf3caf71c40a124101b33dee6c510188e (patch) | |
tree | 7833a5980490fdfc6abf68f513ea879b91cd81bd /intern/cycles/kernel/shaders | |
parent | 42b26206c66581f10a03a0908ee777f8d205b2fa (diff) |
added vessel for disney diffuse shader
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r-- | intern/cycles/kernel/shaders/CMakeLists.txt | 1 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/node_disney_bsdf.osl | 38 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/stdosl.h | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt index 49030f33c26..c6c9e6ed009 100644 --- a/intern/cycles/kernel/shaders/CMakeLists.txt +++ b/intern/cycles/kernel/shaders/CMakeLists.txt @@ -81,6 +81,7 @@ set(SRC_OSL node_wireframe.osl node_hair_bsdf.osl node_uv_map.osl + #node_disney_bsdf.osl ) set(SRC_OSL_HEADERS diff --git a/intern/cycles/kernel/shaders/node_disney_bsdf.osl b/intern/cycles/kernel/shaders/node_disney_bsdf.osl new file mode 100644 index 00000000000..9bd225dd391 --- /dev/null +++ b/intern/cycles/kernel/shaders/node_disney_bsdf.osl @@ -0,0 +1,38 @@ +/* + * Copyright 2011-2013 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "stdosl.h" + +shader node_disney_bsdf( + color BaseColor = color(0.64555527, 0.41514809, 0.01698805), + float Metallic = 0.0, + float Subsurface = 0.0, + float Specular = 0.5, + float Roughness = 0.5, + float SpecularTint = 0.0, + float Anisotropic = 0.0, + float Sheen = 0.0, + float SheenTint = 0.5, + float Clearcoat = 0.0, + float ClearcoatGloss = 1.0, + normal Normal = N, + normal Tangent = normalize(dPdu), + normal AnisotropicRotation = normal(0, 0, 0), + output closure color BSDF = 0) +{ + BSDF = disney_diffuse(Normal, BaseColor); +} + diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h index 8d5d3746caf..83e8bc61c6c 100644 --- a/intern/cycles/kernel/shaders/stdosl.h +++ b/intern/cycles/kernel/shaders/stdosl.h @@ -536,6 +536,7 @@ closure color emission() BUILTIN; closure color background() BUILTIN; closure color holdout() BUILTIN; closure color ambient_occlusion() BUILTIN; +closure color disney_diffuse(normal N, color c) BUILTIN; // BSSRDF closure color bssrdf_cubic(normal N, vector radius, float texture_blur, float sharpness) BUILTIN; |