[Bf-blender-cvs] [179eadc91f2] tmp-workbench-rewrite2: clean-up and formatting
Miguel Pozo
noreply at git.blender.org
Fri Nov 4 19:15:52 CET 2022
Commit: 179eadc91f25f1e074b52f665cecc4b4e8b48a89
Author: Miguel Pozo
Date: Thu Nov 3 20:50:39 2022 +0100
Branches: tmp-workbench-rewrite2
https://developer.blender.org/rB179eadc91f25f1e074b52f665cecc4b4e8b48a89
clean-up and formatting
===================================================================
M source/blender/draw/engines/workbench/workbench_effect_cavity.cc
M source/blender/draw/engines/workbench/workbench_engine.cc
M source/blender/draw/engines/workbench/workbench_private.hh
M source/blender/draw/engines/workbench/workbench_resources.cc
===================================================================
diff --git a/source/blender/draw/engines/workbench/workbench_effect_cavity.cc b/source/blender/draw/engines/workbench/workbench_effect_cavity.cc
index f2ec83fbf73..c0ee7fd60c2 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_cavity.cc
+++ b/source/blender/draw/engines/workbench/workbench_effect_cavity.cc
@@ -9,7 +9,7 @@
* We use Screen Space Ambient Occlusion (SSAO) to enhance geometric details of the surfaces.
* We also use a Curvature effect computed only using the surface normals.
*
- * This is done after the opaque pass. It only affects the opaque surfaces.
+ * This is done as part of the opaque resolve pass. It only affects the opaque surfaces.
*/
#include "BLI_rand.h"
diff --git a/source/blender/draw/engines/workbench/workbench_engine.cc b/source/blender/draw/engines/workbench/workbench_engine.cc
index 74615a29320..0a3d89f37f0 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.cc
+++ b/source/blender/draw/engines/workbench/workbench_engine.cc
@@ -18,7 +18,6 @@ namespace blender::workbench {
using namespace draw;
-// Utils
GPUMaterial **get_dummy_gpu_materials(int material_count);
class Instance {
@@ -155,7 +154,6 @@ class Instance {
*/
}
else {
- /* workbench_cache_common_populate && workbench_cache_texpaint_populate */
if (object_state.use_per_material_batches) {
const int material_count = DRW_cache_object_material_count_get(ob_ref.object);
@@ -352,8 +350,6 @@ class Instance {
}
};
-// Utils
-
/* This returns an array of nullptr GPUMaterial pointers so we can call
* DRW_cache_object_surface_material_get. They never get actually used.
*/
diff --git a/source/blender/draw/engines/workbench/workbench_private.hh b/source/blender/draw/engines/workbench/workbench_private.hh
index bdcceb5b1d4..b60ec8e6439 100644
--- a/source/blender/draw/engines/workbench/workbench_private.hh
+++ b/source/blender/draw/engines/workbench/workbench_private.hh
@@ -87,7 +87,7 @@ struct SceneState {
bool reset_taa_next_sample;
bool render_finished;
- /** Used when material_type == eMaterialType::SINGLE */
+ /* Used when material_type == eMaterialType::SINGLE */
Material material_override = Material(float3(1.0f));
/* When r == -1.0 the shader uses the vertex color */
Material material_attribute_color = Material(float3(-1.0f));
@@ -122,7 +122,6 @@ class CavityEffect {
public:
void init(const SceneState &scene_state, struct SceneResources &resources);
-
void setup_resolve_pass(PassSimple &pass, struct SceneResources &resources);
};
@@ -189,9 +188,7 @@ class OpaquePass {
PassSimple deferred_ps_ = {"Opaque.Deferred"};
void sync(const SceneState &scene_state, SceneResources &resources);
-
void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution);
-
bool is_empty() const;
};
@@ -210,9 +207,7 @@ class TransparentPass {
Framebuffer resolve_fb;
void sync(const SceneState &scene_state, SceneResources &resources);
-
void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution);
-
bool is_empty() const;
};
@@ -229,9 +224,7 @@ class TransparentDepthPass {
Framebuffer merge_fb = {"TransparentDepth.Merge"};
void sync(const SceneState &scene_state, SceneResources &resources);
-
void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution);
-
bool is_empty() const;
};
@@ -293,15 +286,15 @@ class DofPass {
class AntiAliasingPass {
private:
bool enabled_;
- /** Current TAA sample index in [0..samples_len_] range. */
+ /* Current TAA sample index in [0..samples_len_] range. */
int sample_;
- /** Total number of samples to after which TAA stops accumulating samples. */
+ /* Total number of samples to after which TAA stops accumulating samples. */
int samples_len_;
- /** Weight accumulated. */
+ /* Weight accumulated. */
float weight_accum_;
- /** Samples weight for this iteration. */
+ /* Samples weight for this iteration. */
float weights_[9];
- /** Sum of weights. */
+ /* Sum of weights. */
float weights_sum_;
Texture sample0_depth_tx_ = {"sample0_depth_tx"};
@@ -332,7 +325,6 @@ class AntiAliasingPass {
public:
AntiAliasingPass();
-
~AntiAliasingPass();
void init(const SceneState &scene_state);
diff --git a/source/blender/draw/engines/workbench/workbench_resources.cc b/source/blender/draw/engines/workbench/workbench_resources.cc
index c890a5bdbb5..db48af0a5a8 100644
--- a/source/blender/draw/engines/workbench/workbench_resources.cc
+++ b/source/blender/draw/engines/workbench/workbench_resources.cc
@@ -69,7 +69,6 @@ LightData get_light_data_from_studio_solidlight(const SolidLight *sl,
void SceneResources::load_jitter_tx(int total_samples)
{
- printf("Load jitter | total samples: %d\n", total_samples);
const int texel_count = jitter_tx_size * jitter_tx_size;
static float4 jitter[texel_count];
More information about the Bf-blender-cvs
mailing list