Commit: b7c1d2e898a67e3adc5c0169fb69886f330c313d
Author: Antony Riakiotakis
Date:   Tue Feb 10 11:34:47 2015 +0100
Branches: viewport_experiments
https://developer.blender.org/rBb7c1d2e898a67e3adc5c0169fb69886f330c313d

Cleanup - bring branch to merge ready condition

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

M       SConstruct
M       release/scripts/startup/bl_ui/properties_data_camera.py
M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/gpu/CMakeLists.txt
M       source/blender/gpu/GPU_compositing.h
M       source/blender/gpu/SConscript
M       source/blender/gpu/intern/gpu_compositing.cpp
M       source/blender/gpu/intern/gpu_extensions.c
D       source/blender/gpu/shaders/gpu_shader_fx_dof_high_frag.glsl
D       source/blender/gpu/shaders/gpu_shader_fx_dof_high_vert.glsl
M       source/blender/makesdna/DNA_gpu_types.h
M       source/blender/makesrna/intern/rna_scene.c

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

diff --git a/SConstruct b/SConstruct
index 7fc87d4..225b532 100644
--- a/SConstruct
+++ b/SConstruct
@@ -764,8 +764,6 @@ if B.targets != ['cudakernels']:
     data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl")
     data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl")
     data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl")
-    
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_high_frag.glsl")
-    
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_high_vert.glsl")
     data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_lib.glsl")
     data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
     data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py 
b/release/scripts/startup/bl_ui/properties_data_camera.py
index 241ff4c..00428f0 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -206,9 +206,6 @@ class DATA_PT_camera_gpu_dof(Panel):
         col.prop(dof_options, "dof_fstop")
         col.prop(dof_options, "dof_focal_length")
         col.prop(dof_options, "dof_sensor")
-        col.prop(dof_options, "dof_quality_mode")
-        if dof_options.dof_quality_mode == 'HIGH':
-            col.prop(dof_options, "dof_num_blades")
 
     @classmethod
     def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 701369e..2df075d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2947,9 +2947,6 @@ class VIEW3D_PT_view3d_shading(Panel):
                     subcol.prop(dof_options, "dof_fstop")
                     subcol.prop(dof_options, "dof_focal_length")
                     subcol.prop(dof_options, "dof_sensor")
-                    subcol.prop(dof_options, "dof_quality_mode")
-                    if dof_options.dof_quality_mode == 'HIGH':
-                        subcol.prop(dof_options, "dof_num_blades")
 
             col.prop(view, "ssao")
             if view.ssao:
diff --git a/source/blender/gpu/CMakeLists.txt 
b/source/blender/gpu/CMakeLists.txt
index cc74459..a9accfc 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -61,8 +61,6 @@ set(SRC
        shaders/gpu_shader_fx_ssao_frag.glsl
        shaders/gpu_shader_fx_dof_frag.glsl
        shaders/gpu_shader_fx_dof_vert.glsl
-       shaders/gpu_shader_fx_dof_high_frag.glsl
-       shaders/gpu_shader_fx_dof_high_vert.glsl
        shaders/gpu_shader_fx_vert.glsl
        shaders/gpu_shader_material.glsl
        shaders/gpu_shader_sep_gaussian_blur_frag.glsl
@@ -100,8 +98,6 @@ data_to_c_simple(shaders/gpu_shader_fx_vert.glsl SRC)
 data_to_c_simple(shaders/gpu_shader_fx_ssao_frag.glsl SRC)
 data_to_c_simple(shaders/gpu_shader_fx_dof_frag.glsl SRC)
 data_to_c_simple(shaders/gpu_shader_fx_dof_vert.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_fx_dof_high_frag.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_fx_dof_high_vert.glsl SRC)
 data_to_c_simple(shaders/gpu_shader_fx_lib.glsl SRC)
 
 if(WITH_GAMEENGINE)
diff --git a/source/blender/gpu/GPU_compositing.h 
b/source/blender/gpu/GPU_compositing.h
index dc997b3..cc00185 100644
--- a/source/blender/gpu/GPU_compositing.h
+++ b/source/blender/gpu/GPU_compositing.h
@@ -58,12 +58,6 @@ typedef enum GPUFXShaderEffect {
        GPU_SHADER_FX_DEPTH_OF_FIELD_PASS_THREE = 4,
        GPU_SHADER_FX_DEPTH_OF_FIELD_PASS_FOUR = 5,
        GPU_SHADER_FX_DEPTH_OF_FIELD_PASS_FIVE = 6,
-
-       /* following are for high quality dof */
-       GPU_SHADER_FX_DEPTH_OF_FIELD_DOWNSAMPLE_HALF = 7, /* downsample to half 
render target */
-       GPU_SHADER_FX_DEPTH_OF_FIELD_DOWNSAMPLE_HALF_COC = 8, /* downsample coc 
(mainly near coc) */
-       GPU_SHADER_FX_DEPTH_OF_FIELD_BLUR = 9, /* combined calculation of near 
and far dof buffers */
-       GPU_SHADER_FX_DEPTH_OF_FIELD_FINAL_COMBINE = 10 /* final combination 
pass */
 } GPUFXShaderEffect;
 
 /* keep in synch with enum above! */
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index cc46ad6..158cfb6 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -68,8 +68,6 @@ sources.extend((
     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_ssao_frag.glsl.c"),
     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_frag.glsl.c"),
     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_vert.glsl.c"),
-    os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_high_frag.glsl.c"),
-    os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_dof_high_vert.glsl.c"),
     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_lib.glsl.c"),
     os.path.join(env['DATA_SOURCES'], "gpu_shader_fx_vert.glsl.c"),
     os.path.join(env['DATA_SOURCES'], "gpu_shader_material.glsl.c"),
diff --git a/source/blender/gpu/intern/gpu_compositing.cpp 
b/source/blender/gpu/intern/gpu_compositing.cpp
index 2097454..d13fc92 100644
--- a/source/blender/gpu/intern/gpu_compositing.cpp
+++ b/source/blender/gpu/intern/gpu_compositing.cpp
@@ -147,133 +147,6 @@ static GPUTexture * create_concentric_sample_texture(int 
side)
        return tex;
 }
 
-/* compositing node - it's different than material nodes because outputs are 
buffers - inputs can be
- * uniforms or other types. outputs are always textures */
-class GPUCompositingNode {
-       private:
-               GPUShader *shader;
-               int w, h;
-               ListBase inputs;
-               ListBase outputs;
-               
-       public:
-               GPUCompositingNode(GPUShader *shader, int w, int h);
-               ~GPUCompositingNode();
-               float getWidth() {return w;}
-               float getHeight() {return h;}
-               void setShader(GPUShader *sh) {shader = sh;}
-};
-
-GPUCompositingNode::GPUCompositingNode(GPUShader *shader, int w, int h)
-{
-       this->w = w;
-       this->h = h;
-       this->shader = shader;
-}
-
-GPUCompositingNode::~GPUCompositingNode() {
-       GPU_shader_free(shader);
-       BLI_freelistN(&inputs);
-       BLI_freelistN(&outputs);
-}
-
-/* compositing link between compostiting stages, */
-class GPUCompositingLink {
-       private:
-               GPUTexture *intexture;
-               char *outslot;
-               int flag;
-       
-       public:
-               GPUCompositingLink(GPUCompositingNode *nodei, 
GPUCompositingNode *nodeo, int inslot, char *output);
-               ~GPUCompositingLink();
-};
-
-GPUCompositingLink::GPUCompositingLink(GPUCompositingNode *nodei, 
GPUCompositingNode *nodeo, int inslot, char *output)
-{
-       this->intexture = intexture;
-       this->outslot = output;
-}
-
-class GPUEffect {
-       protected:
-               ListBase nodes;
-
-       public:
-               virtual ~GPUEffect() {}
-               
-               // prepare or cleanup nodes accorging to new effect parameters
-               virtual void prepare(GPUFXOptions *options, int w, int h) = 0;
-               // queue the effect nodes for execution
-               virtual void queue() = 0;
-               //checks if effect has been initialized with sane inputs
-               virtual bool checkvalid() = 0;
-               virtual void cleanup() = 0;
-};
-
-class GPUDOFEffect : public GPUEffect {
-       public:
-               GPUDOFEffect();
-               ~GPUDOFEffect();
-};
-
-class GPUSSAOEffect : public GPUEffect {
-       private:
-               GPUShader *shader_persp;
-               GPUShader *shader_ortho;
-               GPUTexture *concentric_samples_tex;
-               int num_samples;
-               /* old target dimensions */
-               int oldx, oldy;
-       
-       public:
-               GPUSSAOEffect();
-               ~GPUSSAOEffect() {cleanup();}
-
-               // prepare or cleanup nodes accorging to new effect parameters
-               void prepare(GPUFXOptions *options, int w, int h);
-               // queue the effect nodes for execution
-               void queue(){}
-               bool checkvalid() {return true;}
-               void cleanup(){}
-};
-
-GPUSSAOEffect::GPUSSAOEffect()
-{
-       /* compile shaders here */
-       shader_persp = GPU_shader_get_builtin_fx_shader(GPU_SHADER_FX_SSAO, 
true);
-       shader_ortho = GPU_shader_get_builtin_fx_shader(GPU_SHADER_FX_SSAO, 
false);
-}
-
-void GPUSSAOEffect::prepare(GPUFXOptions *options, int UNUSED(w), int 
UNUSED(h))
-{
-       if (options->ssao_options) {
-               if (options->ssao_options->ssao_num_samples != num_samples || 
!concentric_samples_tex) {
-                       if (options->ssao_options->ssao_num_samples < 1)
-                               options->ssao_options->ssao_num_samples = 1;
-                       
-                       num_samples = options->ssao_options->ssao_num_samples;
-                       
-                       if (concentric_samples_tex) {
-                               GPU_texture_free(concentric_samples_tex);
-                       }
-                       
-                       concentric_samples_tex = 
create_concentric_sample_texture(num_samples);
-               }
-       }
-       else {
-               if (concentric_samples_tex) {
-                       GPU_texture_free(concentric_samples_tex);
-                       concentric_samples_tex = NULL;
-               }
-       }
-}
-
-/* manages resources and data flow between nodes */
-class GPUCompositorManager {
-       
-};
-
 /* generate a new FX compositor */
 GPUFX *GPU_create_fx_compositor(void)
 {
@@ -396,8 +269,8 @@ bool GPU_initialize_fx_passes(GPUFX *fx, rcti *rect, rcti 
*scissor_rect, int fxf
        }
 
        /* disable effects if no options passed for them */
-       if (!options->dof_options  || (options->dof_options->dof_quality_mode 
== DOF_QUALITY_HIGH)) {
-               //fxflags &= ~GPU_FX_DEPTH_OF_FIELD;
+       if (!options->dof_options) {
+               fxflags &= ~GPU_FX_DEPTH_OF_FIELD;
        }
        if (!options->ssao_options || options->ssao_options->ssao_num_samples < 
1) {
                fxflags &= ~GPU_FX_SSAO;
@@ -466,68 +339,24 @@ bool GPU_initialize_fx_passes(GPUFX *fx, rcti *rect, rcti 
*scissor_rect, int fxf
        
        /* create textures for dof effect */
        if (fxflags & GPU_FX_DEPTH_OF_FIELD) {
-               if (options->dof_options->dof_quality_mode == DOF_QUALITY_HIGH) 
{
-                       /* we use a different scheme here */
-                       if (!fx->dof_near_blur || !fx->dof_far_blur || 
!fx->dof_nearfar_coc || !fx->dof_half_downsampled) {
-                               int i, ds_w, ds_h;
-                               /* half width instead of quad width */
-                               fx->dof_downsampled_w = w / 2;
-                               fx->dof_downsampled_h = h / 2;
-                               ds_w = fx->dof_downsampled_w;
-                               ds_h = fx->dof_downsampled_h;
-
-                               if (!(fx->dof_near_blur = 
GPU_texture_create_2D(fx->dof_downsampled_w, fx->dof_downsampled_h, NULL, 
GPU_HDR_NONE, err_out))) {
-                                       printf("%.256s\n", err_out);
-                                       cleanup_fx_gl_data(fx, true);
-                                       return false;
-                               }
-                               if (!(fx->dof_far_blur = 
GPU_texture_create_2D(fx->dof_downsampled_w, fx->dof_downsampled_h, NULL, 
GPU_HDR_NONE, err_out))) {
-                                       printf("%.256s\n", err_out);
-                                       cleanup_fx_gl_data(fx, true);
-                                       return false;
-                               }
-                               if (!(fx->dof_half_downsampled = 
GPU_texture_create_2D(fx->dof_downsampled_w, fx

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to