[Bf-blender-cvs] [01968f95edf] hair_guides: Merge branch 'blender2.8' into hair_guides
Lukas Tönne
noreply at git.blender.org
Sun Nov 19 11:56:22 CET 2017
Commit: 01968f95edf45daa453e6440b375cae68eed8678
Author: Lukas Tönne
Date: Sun Nov 19 10:56:04 2017 +0000
Branches: hair_guides
https://developer.blender.org/rB01968f95edf45daa453e6440b375cae68eed8678
Merge branch 'blender2.8' into hair_guides
===================================================================
===================================================================
diff --cc source/blender/draw/CMakeLists.txt
index 3eee2847363,9c806f26fda..d248f4e4d57
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@@ -57,12 -57,11 +57,13 @@@ set(SR
intern/draw_cache.c
intern/draw_cache_impl_curve.c
intern/draw_cache_impl_displist.c
+ intern/draw_cache_impl_hair.c
intern/draw_cache_impl_lattice.c
intern/draw_cache_impl_mesh.c
+ intern/draw_cache_impl_metaball.c
intern/draw_cache_impl_particles.c
intern/draw_common.c
+ intern/draw_hair.c
intern/draw_manager.c
intern/draw_manager_text.c
intern/draw_manager_profiling.c
diff --cc source/blender/draw/engines/eevee/eevee_materials.c
index 98eaedc8fd9,b0e30109a7f..e32bcbc1710
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@@ -813,10 -760,10 +819,10 @@@ struct GPUMaterial *EEVEE_material_hair
**/
static struct DRWShadingGroup *EEVEE_default_shading_group_create(
EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata, DRWPass *pass,
- bool is_hair, bool is_flat_normal, bool use_blend, bool use_ssr, int shadow_method)
+ bool is_hair, bool is_hair_fibers, bool is_flat_normal, bool use_blend, bool use_ssr, int shadow_method)
{
static int ssr_id;
- ssr_id = (use_ssr) ? 0 : -1;
+ ssr_id = (use_ssr) ? 1 : -1;
int options = VAR_MAT_MESH;
if (is_hair) options |= VAR_MAT_HAIR;
@@@ -842,10 -788,10 +848,10 @@@
**/
static struct DRWShadingGroup *EEVEE_default_shading_group_get(
EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata,
- bool is_hair, bool is_flat_normal, bool use_ssr, int shadow_method)
+ bool is_hair, bool is_hair_fibers, bool is_flat_normal, bool use_ssr, int shadow_method)
{
static int ssr_id;
- ssr_id = (use_ssr) ? 0 : -1;
+ ssr_id = (use_ssr) ? 1 : -1;
int options = VAR_MAT_MESH;
if (is_hair) options |= VAR_MAT_HAIR;
diff --cc source/blender/draw/engines/eevee/eevee_private.h
index 55cb36c9212,b1ed108bad0..e6a28050c16
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@@ -107,15 -106,16 +107,16 @@@ enum
/* Max number of variation */
/* IMPORTANT : Leave it last and set
* it's value accordingly. */
- VAR_MAT_MAX = (1 << 7),
+ VAR_MAT_MAX = (1 << 8),
/* These are options that are not counted in VAR_MAT_MAX
* because they are not cumulative with the others above. */
- VAR_MAT_CLIP = (1 << 8),
- VAR_MAT_HASH = (1 << 9),
- VAR_MAT_MULT = (1 << 10),
- VAR_MAT_SHADOW = (1 << 11),
+ VAR_MAT_CLIP = (1 << 9),
+ VAR_MAT_HASH = (1 << 10),
+ VAR_MAT_MULT = (1 << 11),
+ VAR_MAT_SHADOW = (1 << 12),
VAR_MAT_REFRACT = (1 << 12),
VAR_MAT_VOLUME = (1 << 13),
+ VAR_MAT_SSS = (1 << 14),
};
/* Shadow Technique */
@@@ -629,10 -639,10 +644,10 @@@ struct GPUMaterial *EEVEE_material_worl
struct GPUMaterial *EEVEE_material_world_volume_get(struct Scene *scene, struct World *wo);
struct GPUMaterial *EEVEE_material_mesh_get(
struct Scene *scene, Material *ma, EEVEE_Data *vedata,
- bool use_blend, bool use_multiply, bool use_refract, int shadow_method);
+ bool use_blend, bool use_multiply, bool use_refract, bool use_sss, int shadow_method);
struct GPUMaterial *EEVEE_material_mesh_volume_get(struct Scene *scene, Material *ma);
struct GPUMaterial *EEVEE_material_mesh_depth_get(struct Scene *scene, Material *ma, bool use_hashed_alpha, bool is_shadow);
-struct GPUMaterial *EEVEE_material_hair_get(struct Scene *scene, Material *ma, int shadow_method);
+struct GPUMaterial *EEVEE_material_hair_get(struct Scene *scene, Material *ma, int shadow_method, bool use_fibers);
void EEVEE_materials_free(void);
void EEVEE_draw_default_passes(EEVEE_PassList *psl);
void EEVEE_update_util_texture(float offset);
diff --cc source/blender/draw/intern/draw_cache.h
index 5bd75df168b,35ac8f4a35d..21bdab2150b
--- a/source/blender/draw/intern/draw_cache.h
+++ b/source/blender/draw/intern/draw_cache.h
@@@ -160,8 -157,7 +160,11 @@@ struct Gwn_Batch *DRW_cache_particles_g
struct Gwn_Batch *DRW_cache_particles_get_dots(struct ParticleSystem *psys);
struct Gwn_Batch *DRW_cache_particles_get_prim(int type);
+/* Hair */
+struct Gwn_Batch *DRW_cache_hair_get_fibers(struct HairSystem *hsys, struct DerivedMesh *scalp, int subdiv,
+ const struct DRWHairFiberTextureBuffer **r_buffer);
+
+ /* Metaball */
+ struct Gwn_Batch *DRW_cache_mball_surface_get(struct Object *ob);
+
#endif /* __DRAW_CACHE_H__ */
diff --cc source/blender/draw/intern/draw_cache_impl.h
index ec7b4f541f4,c998282ae1f..d24fe69dd6b
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@@ -26,15 -26,13 +26,16 @@@
#ifndef __DRAW_CACHE_IMPL_H__
#define __DRAW_CACHE_IMPL_H__
- struct Gwn_Batch;
+ struct CurveCache;
struct GPUMaterial;
+ struct Gwn_Batch;
struct ListBase;
- struct CurveCache;
- struct ParticleSystem;
+ struct MetaBall;
struct ModifierData;
+ struct ParticleSystem;
+struct HairSystem;
+struct DRWHairFiberTextureBuffer;
+struct DerivedMesh;
struct Curve;
struct Lattice;
diff --cc source/blender/draw/intern/draw_manager.c
index 3640e498bd7,672149b9e43..6ac4dfb64df
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@@ -3787,10 -3804,10 +3804,13 @@@ void DRW_engines_register(void
/* BKE: particle.c */
extern void *BKE_particle_batch_cache_dirty_cb;
extern void *BKE_particle_batch_cache_free_cb;
+ /* BKE: hair.c */
+ extern void *BKE_hair_batch_cache_dirty_cb;
+ extern void *BKE_hair_batch_cache_free_cb;
+ BKE_mball_batch_cache_dirty_cb = DRW_mball_batch_cache_dirty;
+ BKE_mball_batch_cache_free_cb = DRW_mball_batch_cache_free;
+
BKE_curve_batch_cache_dirty_cb = DRW_curve_batch_cache_dirty;
BKE_curve_batch_cache_free_cb = DRW_curve_batch_cache_free;
More information about the Bf-blender-cvs
mailing list