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
path: root/source
diff options
context:
space:
mode:
authorClément Fukhaut <turjuque@gmail.com>2016-06-05 16:59:05 +0300
committerClément Fukhaut <turjuque@gmail.com>2016-06-05 16:59:05 +0300
commitd28c4d4a7cf30f74a6deaf7f148865fe06bae108 (patch)
tree770d0abe4679faa98c45ef6f98b7d8a08b476daf /source
parent96f6372a0762295b968d0eadc6f15611acc72736 (diff)
Polishing UI and added new splash
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material_bsdf_ambient_occlusion.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material_utils.glsl2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
7 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 716f5362313..727da41890a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2919,7 +2919,6 @@ static void gpu_update_backface_buffer(Scene *scene, View3D *v3d, ARegion *basea
RegionView3D rv3d = {{{0}}};
GPUScreenBuffer *backface_buffer;
int res[2] = {basear->winx, basear->winy};
- int pbr_flag = v3d->pbr_settings.pbr_flag;
backface_buffer = GPU_pbr_backface_buffer(v3d->pbr, res[0], res[1]);
@@ -2952,7 +2951,6 @@ static void gpu_update_backface_buffer(Scene *scene, View3D *v3d, ARegion *basea
v3d->drawtype = drawtype;
v3d->flag2 = flag2;
v3d->flag3 = flag3;
- v3d->pbr_settings.pbr_flag = pbr_flag;
GPU_scenebuf_unbind(backface_buffer);
GPU_scenebuf_filter_texture(backface_buffer);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 337f573b394..a53a9d0340a 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1795,7 +1795,7 @@ void GPU_begin_object_materials(
GMS.gviewinv = rv3d->viewinv;
GMS.gviewcamtexcofac = rv3d->viewcamtexcofac;
GMS.is_realistic_mat = (new_shading_nodes && (v3d->pbr_settings.pbr_flag & GPU_PBR_FLAG_ENABLE));
- GMS.is_alpha_as_depth = (v3d->flag3 & (V3D_FLIP_NORMALS | V3D_PROBE_CAPTURE));
+ GMS.is_alpha_as_depth = (v3d->flag3 & V3D_PROBE_CAPTURE);
GMS.gprobe = NULL;
GMS.gpbr = NULL;
GMS.gpbrsettings = NULL;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 009044a65c9..5fdb9f531ca 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -701,6 +701,7 @@ void GPU_material_bind_uniforms_pbr(GPUMaterial *material, GPUProbe *probe, GPUP
}
if (pbr_settings->pbr_flag & GPU_PBR_FLAG_SSAO) {
+ World *wo = material->scene->world;
/* SSAO Parameters */
/* x : sample : Number of samples
* y : steps : Steps for the raymarching
@@ -708,8 +709,9 @@ void GPU_material_bind_uniforms_pbr(GPUMaterial *material, GPUProbe *probe, GPUP
float ssaoparams[4];
ssaoparams[0] = pbr_settings->ssao->samples;
ssaoparams[1] = pbr_settings->ssao->steps;
- ssaoparams[2] = pbr_settings->ssao->distance_max;
- GPU_shader_uniform_vector(shader, material->ssaoparamsloc, 3, 1, ssaoparams);
+ ssaoparams[2] = (wo) ? wo->aodist : 1.0;
+ ssaoparams[3] = pbr_settings->ssao->factor;
+ GPU_shader_uniform_vector(shader, material->ssaoparamsloc, 4, 1, ssaoparams);
}
}
}
diff --git a/source/blender/gpu/shaders/gpu_shader_material_bsdf_ambient_occlusion.glsl b/source/blender/gpu/shaders/gpu_shader_material_bsdf_ambient_occlusion.glsl
index 8d37e1523de..853f9fbfd2a 100644
--- a/source/blender/gpu/shaders/gpu_shader_material_bsdf_ambient_occlusion.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material_bsdf_ambient_occlusion.glsl
@@ -131,7 +131,7 @@ void ssao(vec3 viewpos, vec3 viewnor, out float result)
}
}
- result = 1.0 - (factor / weight);
+ result = saturate(1.0 - (factor / weight) * unfssaoparam.w);
}
#endif
#else
diff --git a/source/blender/gpu/shaders/gpu_shader_material_utils.glsl b/source/blender/gpu/shaders/gpu_shader_material_utils.glsl
index b7868a77434..cf879018f23 100644
--- a/source/blender/gpu/shaders/gpu_shader_material_utils.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material_utils.glsl
@@ -41,7 +41,7 @@ uniform vec3 unfsh8;
uniform vec3 unfprobepos;
uniform vec3 unfplanarvec;
uniform vec3 unfssrparam;
-uniform vec3 unfssaoparam;
+uniform vec4 unfssaoparam;
uniform vec4 unfclip;
uniform mat4 unfprobecorrectionmat;
uniform mat4 unfplanarreflectmat;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index c8e0b7b914c..4d1a3d9400e 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -4522,7 +4522,7 @@ static void rna_def_gpu_ssao_fx(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "steps", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Steps", "Number of steps per samples. Helps detecting thin objects with large distance setting.");
+ RNA_def_property_ui_text(prop, "Steps", "Number of steps per samples. Helps detecting thin objects when using a large occlusion distance.");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 4f2c3463c09..4be077a8863 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2365,7 +2365,7 @@ static void rna_def_gpu_pbr_ssr(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "steps", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Steps", "Number of samples");
+ RNA_def_property_ui_text(prop, "Steps", "Number of pixels to travel for searching intersections");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
}