diff options
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_phong_ramp.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_phong_ramp.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_phong_ramp.h b/intern/cycles/kernel/closure/bsdf_phong_ramp.h index 43f8cf71c59..74cc62d917b 100644 --- a/intern/cycles/kernel/closure/bsdf_phong_ramp.h +++ b/intern/cycles/kernel/closure/bsdf_phong_ramp.h @@ -36,11 +36,11 @@ CCL_NAMESPACE_BEGIN #ifdef __OSL__ -typedef ccl_addr_space struct PhongRampBsdf { +typedef struct PhongRampBsdf { SHADER_CLOSURE_BASE; float exponent; - float3 *colors; + ccl_private float3 *colors; } PhongRampBsdf; static_assert(sizeof(ShaderClosure) >= sizeof(PhongRampBsdf), "PhongRampBsdf is too large!"); @@ -59,19 +59,19 @@ ccl_device float3 bsdf_phong_ramp_get_color(const float3 colors[8], float pos) return colors[ipos] * (1.0f - offset) + colors[ipos + 1] * offset; } -ccl_device int bsdf_phong_ramp_setup(PhongRampBsdf *bsdf) +ccl_device int bsdf_phong_ramp_setup(ccl_private PhongRampBsdf *bsdf) { bsdf->type = CLOSURE_BSDF_PHONG_RAMP_ID; bsdf->exponent = max(bsdf->exponent, 0.0f); return SD_BSDF | SD_BSDF_HAS_EVAL; } -ccl_device float3 bsdf_phong_ramp_eval_reflect(const ShaderClosure *sc, +ccl_device float3 bsdf_phong_ramp_eval_reflect(ccl_private const ShaderClosure *sc, const float3 I, const float3 omega_in, - float *pdf) + ccl_private float *pdf) { - const PhongRampBsdf *bsdf = (const PhongRampBsdf *)sc; + ccl_private const PhongRampBsdf *bsdf = (ccl_private const PhongRampBsdf *)sc; float m_exponent = bsdf->exponent; float cosNI = dot(bsdf->N, omega_in); float cosNO = dot(bsdf->N, I); @@ -92,28 +92,28 @@ ccl_device float3 bsdf_phong_ramp_eval_reflect(const ShaderClosure *sc, return make_float3(0.0f, 0.0f, 0.0f); } -ccl_device float3 bsdf_phong_ramp_eval_transmit(const ShaderClosure *sc, +ccl_device float3 bsdf_phong_ramp_eval_transmit(ccl_private const ShaderClosure *sc, const float3 I, const float3 omega_in, - float *pdf) + ccl_private float *pdf) { return make_float3(0.0f, 0.0f, 0.0f); } -ccl_device int bsdf_phong_ramp_sample(const ShaderClosure *sc, +ccl_device int bsdf_phong_ramp_sample(ccl_private const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, - float3 *eval, - float3 *omega_in, - float3 *domega_in_dx, - float3 *domega_in_dy, - float *pdf) + ccl_private float3 *eval, + ccl_private float3 *omega_in, + ccl_private float3 *domega_in_dx, + ccl_private float3 *domega_in_dy, + ccl_private float *pdf) { - const PhongRampBsdf *bsdf = (const PhongRampBsdf *)sc; + ccl_private const PhongRampBsdf *bsdf = (ccl_private const PhongRampBsdf *)sc; float cosNO = dot(bsdf->N, I); float m_exponent = bsdf->exponent; |