Commit: e806f478e55c1b4821f14dcd1332e55cfe0509e8
Author: TheOnlyJoey
Date:   Fri Mar 11 04:45:52 2016 +0100
Branches: HMD_viewport
https://developer.blender.org/rBe806f478e55c1b4821f14dcd1332e55cfe0509e8

Finished lens distortion shader, removed some unused variables and cleaned up a 
bit

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

M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/editors/space_view3d/view3d_draw.c
M       source/blender/gpu/intern/gpu_compositing.c
M       source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_vert.glsl

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 7723502..cbcdb86 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3260,7 +3260,6 @@ class VIEW3D_PT_view3d_shading(Panel):
             sub.active = view.region_3d.view_perspective == 'CAMERA'
             sub.prop(fx_settings, "use_dof")
             col.prop(fx_settings, "use_ssao", text="Ambient Occlusion")
-            col.prop(fx_settings, "use_lens_dist", text="MYBUTTOX")
             if fx_settings.use_ssao:
                 ssao_settings = fx_settings.ssao
                 subcol = col.column(align=True)
diff --git a/source/blender/editors/space_view3d/view3d_draw.c 
b/source/blender/editors/space_view3d/view3d_draw.c
index 7f8bac1..b943774 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3232,23 +3232,16 @@ void ED_view3d_draw_offscreen(
        /* framebuffer fx needed, we need to draw offscreen first */
        if (v3d->fx_settings.fx_flag && fx) {
                GPUSSAOSettings *ssao = NULL;
-        GPUSSAOSettings *lens_dist = NULL;
 
                if (v3d->drawtype < OB_SOLID) {
                        ssao = v3d->fx_settings.ssao;
                        v3d->fx_settings.ssao = NULL;
-
-                       lens_dist = v3d->fx_settings.lens_dist;
-                       v3d->fx_settings.lens_dist = NULL;
                }
 
                do_compositing = GPU_fx_compositor_initialize_passes(fx, 
&ar->winrct, NULL, fx_settings);
 
                if (ssao)
                        v3d->fx_settings.ssao = ssao;
-
-        if (lens_dist)
-                       v3d->fx_settings.lens_dist = lens_dist;
        }
 
        /* clear opengl buffers */
diff --git a/source/blender/gpu/intern/gpu_compositing.c 
b/source/blender/gpu/intern/gpu_compositing.c
index 4faa5b9..8869ae8 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -727,7 +727,6 @@ bool GPU_fx_do_composite_pass(
                GPUShader *ssao_shader;
                ssao_shader = 
GPU_shader_get_builtin_fx_shader(GPU_SHADER_FX_SSAO, is_persp);
                if (ssao_shader) {
-            printf("SSAO BIATCH\n");
                        const GPUSSAOSettings *fx_ssao = fx->settings.ssao;
                        int color_uniform, depth_uniform;
                        int ssao_uniform, ssao_color_uniform, viewvecs_uniform, 
ssao_sample_params_uniform;
@@ -1280,17 +1279,14 @@ bool GPU_fx_do_composite_pass(
     /* third pass, Lens Distortion */
     if(fx->effects & GPU_FX_FLAG_LensDist) {
         GPUShader *lensdist_shader;
-        //printf("STUFF AND SUCH\n");
                lensdist_shader = 
GPU_shader_get_builtin_fx_shader(GPU_SHADER_FX_LENS_DISTORTION, is_persp);
                if (lensdist_shader) {
-            //printf("I am such lens shader\n");
-                       //const GPULensDistortionSettings *fx_lens_dist = 
fx->settings.lens_dist;
-
-                       GPU_shader_bind(lensdist_shader);
 
             int color_uniform;
             color_uniform = GPU_shader_get_uniform(lensdist_shader, 
"warpTexture");
 
+            GPU_shader_bind(lensdist_shader);
+
                        GPU_texture_bind(src, numslots++);
                        GPU_shader_uniform_texture(lensdist_shader, 
color_uniform, src);
 
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_vert.glsl 
b/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_vert.glsl
index 9f71ed6..0c08c6b 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_vert.glsl
@@ -1,6 +1,5 @@
 void main(void)
 {
-       gl_TexCoord[0] = gl_MultiTexCoord0;
-       gl_Position = ftransform();
+    gl_Position = gl_Vertex;
 }

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

Reply via email to