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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /intern/cycles/kernel/closure/emissive.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/cycles/kernel/closure/emissive.h')
-rw-r--r--intern/cycles/kernel/closure/emissive.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/intern/cycles/kernel/closure/emissive.h b/intern/cycles/kernel/closure/emissive.h
index a7f4a2a7327..911382e6865 100644
--- a/intern/cycles/kernel/closure/emissive.h
+++ b/intern/cycles/kernel/closure/emissive.h
@@ -36,26 +36,26 @@ CCL_NAMESPACE_BEGIN
ccl_device void background_setup(ShaderData *sd, const float3 weight)
{
- if(sd->flag & SD_EMISSION) {
- sd->closure_emission_background += weight;
- }
- else {
- sd->flag |= SD_EMISSION;
- sd->closure_emission_background = weight;
- }
+ if (sd->flag & SD_EMISSION) {
+ sd->closure_emission_background += weight;
+ }
+ else {
+ sd->flag |= SD_EMISSION;
+ sd->closure_emission_background = weight;
+ }
}
/* EMISSION CLOSURE */
ccl_device void emission_setup(ShaderData *sd, const float3 weight)
{
- if(sd->flag & SD_EMISSION) {
- sd->closure_emission_background += weight;
- }
- else {
- sd->flag |= SD_EMISSION;
- sd->closure_emission_background = weight;
- }
+ if (sd->flag & SD_EMISSION) {
+ sd->closure_emission_background += weight;
+ }
+ else {
+ sd->flag |= SD_EMISSION;
+ sd->closure_emission_background = weight;
+ }
}
/* return the probability distribution function in the direction I,
@@ -63,21 +63,21 @@ ccl_device void emission_setup(ShaderData *sd, const float3 weight)
* the PDF computed by sample(). */
ccl_device float emissive_pdf(const float3 Ng, const float3 I)
{
- float cosNO = fabsf(dot(Ng, I));
- return (cosNO > 0.0f)? 1.0f: 0.0f;
+ float cosNO = fabsf(dot(Ng, I));
+ return (cosNO > 0.0f) ? 1.0f : 0.0f;
}
-ccl_device void emissive_sample(const float3 Ng, float randu, float randv,
- float3 *omega_out, float *pdf)
+ccl_device void emissive_sample(
+ const float3 Ng, float randu, float randv, float3 *omega_out, float *pdf)
{
- /* todo: not implemented and used yet */
+ /* todo: not implemented and used yet */
}
ccl_device float3 emissive_simple_eval(const float3 Ng, const float3 I)
{
- float res = emissive_pdf(Ng, I);
+ float res = emissive_pdf(Ng, I);
- return make_float3(res, res, res);
+ return make_float3(res, res, res);
}
CCL_NAMESPACE_END