diff options
author | Thomas Dinges <blender@dingto.org> | 2012-09-06 03:22:36 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-09-06 03:22:36 +0400 |
commit | 3f7b4916e9bcd89bb289f3b1d5749c5bcb956f6a (patch) | |
tree | a24901e5f3543a5cc07fd3ac1b5e9c97bcd3d1ef /intern/cycles/kernel/osl/osl_closures.h | |
parent | 36797a64a5ef548e25d2383025d9e4ae0a82f424 (diff) |
OSL Backend:
* Added the Phong BRDF from the inbuilt OSL shader library.
This can be used in OSL shaders only for now:
* phong(normal N, float exponent)
* phong_ramp(normal N, float exponent, color colors[8]
Diffstat (limited to 'intern/cycles/kernel/osl/osl_closures.h')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index 1b4288b8601..00794183ca5 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -51,6 +51,8 @@ enum { OSL_CLOSURE_BSDF_MICROFACET_BECKMANN_ID, OSL_CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, OSL_CLOSURE_BSDF_WARD_ID, + OSL_CLOSURE_BSDF_PHONG_ID, + OSL_CLOSURE_BSDF_PHONG_RAMP_ID, OSL_CLOSURE_BSDF_ASHIKHMIN_VELVET_ID, OSL_CLOSURE_BSDF_WESTIN_BACKSCATTER_ID, OSL_CLOSURE_BSDF_WESTIN_SHEEN_ID, @@ -73,6 +75,8 @@ extern OSL::ClosureParam bsdf_microfacet_ggx_refraction_params[]; extern OSL::ClosureParam bsdf_microfacet_beckmann_params[]; extern OSL::ClosureParam bsdf_microfacet_beckmann_refraction_params[]; extern OSL::ClosureParam bsdf_ward_params[]; +extern OSL::ClosureParam bsdf_phong_params[]; +extern OSL::ClosureParam bsdf_phong_ramp_params[]; extern OSL::ClosureParam bsdf_ashikhmin_velvet_params[]; extern OSL::ClosureParam bsdf_westin_backscatter_params[]; extern OSL::ClosureParam bsdf_westin_sheen_params[]; @@ -94,6 +98,8 @@ void bsdf_microfacet_ggx_refraction_prepare(OSL::RendererServices *, int id, voi void bsdf_microfacet_beckmann_prepare(OSL::RendererServices *, int id, void *data); void bsdf_microfacet_beckmann_refraction_prepare(OSL::RendererServices *, int id, void *data); void bsdf_ward_prepare(OSL::RendererServices *, int id, void *data); +void bsdf_phong_prepare(OSL::RendererServices *, int id, void *data); +void bsdf_phong_ramp_prepare(OSL::RendererServices *, int id, void *data); void bsdf_ashikhmin_velvet_prepare(OSL::RendererServices *, int id, void *data); void bsdf_westin_backscatter_prepare(OSL::RendererServices *, int id, void *data); void bsdf_westin_sheen_prepare(OSL::RendererServices *, int id, void *data); |