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
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2018-11-23 15:08:15 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2018-11-23 15:19:53 +0300
commit071f4f4ce0b9520ab0c73d6d68365ad449ca8b80 (patch)
tree9f37bfcac669366b9ad5fb7605f2fbbed9b71b0a /source/blender/gpu
parent0a2b2d59a5897212ba3771503feb6770fb636bc8 (diff)
Cycles: Improved robustness of hair motion blur.motion_curve_fix
In some instances, the number of control vertices of a hair could change mid-frame. Cycles would then be unable to calculate proper motion blur for those hairs. This adds interpolated CVs to fill in for the missing data. While this will not necessarily result in a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it. Reviewers: #cycles, sergey Reviewed By: #cycles, sergey Subscribers: sergey, brecht, #cycles Tags: #cycles Differential Revision: https://developer.blender.org/D3695
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt22
-rw-r--r--source/blender/gpu/GPU_texture.h8
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h6
-rw-r--r--source/blender/gpu/intern/gpu_shader.c2
5 files changed, 12 insertions, 34 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 0fde0e2a4a9..31cf2033714 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -62,28 +62,6 @@ set(SRC
intern/gpu_shader.c
intern/gpu_texture.c
- shaders/gpu_shader_fx_lib.glsl
- 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_hq_frag.glsl
- shaders/gpu_shader_fx_dof_hq_vert.glsl
- shaders/gpu_shader_fx_dof_hq_geo.glsl
- shaders/gpu_shader_fx_vert.glsl
- shaders/gpu_shader_material.glsl
- shaders/gpu_shader_sep_gaussian_blur_frag.glsl
- shaders/gpu_shader_sep_gaussian_blur_vert.glsl
- shaders/gpu_shader_basic_frag.glsl
- shaders/gpu_shader_basic_vert.glsl
- shaders/gpu_shader_basic_geom.glsl
- shaders/gpu_shader_vertex.glsl
- shaders/gpu_shader_vsm_store_frag.glsl
- shaders/gpu_shader_vsm_store_vert.glsl
- shaders/gpu_shader_fx_depth_resolve.glsl
- shaders/gpu_shader_fire_frag.glsl
- shaders/gpu_shader_smoke_frag.glsl
- shaders/gpu_shader_smoke_vert.glsl
-
GPU_basic_shader.h
GPU_buffers.h
GPU_compositing.h
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 1ae3d73991e..0aa6d86689e 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -49,10 +49,10 @@ typedef struct GPUTexture GPUTexture;
* graphics card capabilities the texture may actually be stored in a
* larger texture with power of two dimensions.
* - can use reference counting:
- * - reference counter after GPU_texture_create is 1
- * - GPU_texture_ref increases by one
- * - GPU_texture_free decreases by one, and frees if 0
- * - if created with from_blender, will not free the texture
+ * - reference counter after GPU_texture_create is 1
+ * - GPU_texture_ref increases by one
+ * - GPU_texture_free decreases by one, and frees if 0
+ * - if created with from_blender, will not free the texture
*/
typedef enum GPUHDRType {
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index cc005e5b6e1..d1e74fc8b3f 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -421,14 +421,14 @@ static void codegen_set_texid(GHash *bindhash, GPUInput *input, int *texid, void
{
if (BLI_ghash_haskey(bindhash, key)) {
/* Reuse existing texid */
- input->texid = GET_INT_FROM_POINTER(BLI_ghash_lookup(bindhash, key));
+ input->texid = POINTER_AS_INT(BLI_ghash_lookup(bindhash, key));
}
else {
/* Allocate new texid */
input->texid = *texid;
(*texid)++;
input->bindtex = true;
- BLI_ghash_insert(bindhash, key, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(bindhash, key, POINTER_FROM_INT(input->texid));
}
}
@@ -478,13 +478,13 @@ static void codegen_set_unique_ids(ListBase *nodes)
if (input->ima) {
if (!BLI_ghash_haskey(definehash, input->ima)) {
input->definetex = true;
- BLI_ghash_insert(definehash, input->ima, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(definehash, input->ima, POINTER_FROM_INT(input->texid));
}
}
else {
if (!BLI_ghash_haskey(definehash, input->link)) {
input->definetex = true;
- BLI_ghash_insert(definehash, input->link, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(definehash, input->link, POINTER_FROM_INT(input->texid));
}
}
}
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index fbb6a845a96..ec2ff7615d5 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -46,9 +46,9 @@ struct GPUVertexAttribs;
struct PreviewImage;
/* Pass Generation
- * - Takes a list of nodes and a desired output, and makes a pass. This
- * will take ownership of the nodes and free them early if unused or
- * at the end if used.
+ * - Takes a list of nodes and a desired output, and makes a pass. This
+ * will take ownership of the nodes and free them early if unused or
+ * at the end if used.
*/
typedef enum GPUDataSource {
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 66945b13aba..5e35b9279d4 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -280,7 +280,7 @@ static void gpu_dump_shaders(const char **code, const int num_shaders, const cha
}
/* We use the same shader index for shaders in the same program.
- * So we call this function once before calling for the invidual shaders. */
+ * So we call this function once before calling for the individual shaders. */
static int shader_index = 0;
if (code == NULL) {
shader_index++;