[Bf-blender-cvs] [498818ae668] principled-v2: Cleanup: Formatting

Lukas Stockner noreply at git.blender.org
Mon Jul 4 23:56:16 CEST 2022


Commit: 498818ae66849d8ec68db7f5691f644656ab6745
Author: Lukas Stockner
Date:   Mon Jul 4 23:31:48 2022 +0200
Branches: principled-v2
https://developer.blender.org/rB498818ae66849d8ec68db7f5691f644656ab6745

Cleanup: Formatting

===================================================================

M	intern/cycles/app/cycles_precompute.cpp
M	intern/cycles/kernel/closure/bsdf_microfacet.h
M	intern/cycles/kernel/closure/bsdf_util.h
M	intern/cycles/kernel/svm/types.h

===================================================================

diff --git a/intern/cycles/app/cycles_precompute.cpp b/intern/cycles/app/cycles_precompute.cpp
index c0f3d732c22..7c6d5d72241 100644
--- a/intern/cycles/app/cycles_precompute.cpp
+++ b/intern/cycles/app/cycles_precompute.cpp
@@ -348,8 +348,8 @@ bool cycles_precompute(std::string name)
           float rough = 1.0f - (float(y) + lcg_step_float(&rng)) / float(ny);
           float mu = (float(x) + lcg_step_float(&rng)) / float(nx);
           float ior = (float(z) + lcg_step_float(&rng)) / float(nz);
-          /* Encode IOR remapped as sqrt(0.5*(IOR-1)) for more resolution at the start, where most of the
-           * changes happen (also places the most common range around 1.5 in the center) */
+          /* Encode IOR remapped as sqrt(0.5*(IOR-1)) for more resolution at the start, where most
+           * of the changes happen (also places the most common range around 1.5 in the center) */
           ior = 1.0f + 2.0f * sqr(ior);
           float u1 = VanDerCorput(i, scramble1);
           float u2 = Sobol2(i, scramble2);
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h
index e31b0d6ea89..7d2fb0eaca6 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet.h
@@ -61,7 +61,7 @@ ccl_device_forceinline float3 reflection_color(ccl_private const MicrofacetBsdf
     return make_float3(f, f, f);
   }
   else if (bsdf->type == CLOSURE_BSDF_MICROFACET_GGX_FRESNEL_V2_ID) {
-    MicrofacetExtrav2 *extra = (MicrofacetExtrav2*) bsdf->extra;
+    MicrofacetExtrav2 *extra = (MicrofacetExtrav2 *)bsdf->extra;
     float cosHL = dot(H, L);
     /* Metallic Fresnel: Kinda Schlick-Fresnel-like with configurable F0 and F90
      * as well as falloff control. F90=white and falloff=0.2 gives classic Schlick Fresnel.
@@ -179,7 +179,7 @@ ccl_device int bsdf_microfacet_ggx_fresnel_v2_setup(ccl_private MicrofacetBsdf *
   bsdf->alpha_x = saturatef(bsdf->alpha_x);
   bsdf->alpha_y = saturatef(bsdf->alpha_y);
 
-  MicrofacetExtrav2 *extra = (MicrofacetExtrav2*) bsdf->extra;
+  MicrofacetExtrav2 *extra = (MicrofacetExtrav2 *)bsdf->extra;
 
   if (metallic > 0.0f) {
     extra->metal_base = saturate(extra->metal_base);
diff --git a/intern/cycles/kernel/closure/bsdf_util.h b/intern/cycles/kernel/closure/bsdf_util.h
index 6468f5cd78c..47ace534440 100644
--- a/intern/cycles/kernel/closure/bsdf_util.h
+++ b/intern/cycles/kernel/closure/bsdf_util.h
@@ -110,8 +110,7 @@ ccl_device float schlick_fresnel(float u)
 }
 
 /* Calculate the fresnel color which is a blend between white and the F0 color */
-ccl_device_forceinline float3
-interpolate_fresnel_color(float3 L, float3 H, float ior, float3 F0)
+ccl_device_forceinline float3 interpolate_fresnel_color(float3 L, float3 H, float ior, float3 F0)
 {
   /* Compute the real Fresnel term and remap it from real_F0...1 to F0...1.
    * We could also just use actual Schlick fresnel (mix(F0, 1, (1-cosI)^5)) here. */
diff --git a/intern/cycles/kernel/svm/types.h b/intern/cycles/kernel/svm/types.h
index 755f36f8ffd..873c470df7a 100644
--- a/intern/cycles/kernel/svm/types.h
+++ b/intern/cycles/kernel/svm/types.h
@@ -591,7 +591,7 @@ typedef enum ClosureType {
 #define CLOSURE_IS_BSDF_MICROFACET_FRESNEL(type) \
   (type == CLOSURE_BSDF_MICROFACET_GGX_FRESNEL_ID || \
    type == CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_FRESNEL_ID)
-   // TODO Fresnel v2
+// TODO Fresnel v2
 #define CLOSURE_IS_BSDF_SHEEN(type) \
   (type == CLOSURE_BSDF_PRINCIPLED_SHEEN_ID || type == CLOSURE_BSDF_PRINCIPLED_SHEEN_V2_ID)
 #define CLOSURE_IS_BSDF_OR_BSSRDF(type) (type <= CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID)



More information about the Bf-blender-cvs mailing list