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:
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r--source/blender/gpu/GPU_material.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index 202e5fd3ad7..0d92d22a173 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -62,6 +62,7 @@ typedef struct GPUNode GPUNode;
typedef struct GPUNodeLink GPUNodeLink;
typedef struct GPUMaterial GPUMaterial;
typedef struct GPULamp GPULamp;
+typedef struct GPUParticleInfo GPUParticleInfo;
/* Functions to create GPU Materials nodes */
@@ -91,7 +92,11 @@ typedef enum GPUBuiltin {
GPU_OBCOLOR = (1 << 6),
GPU_AUTO_BUMPSCALE = (1 << 7),
GPU_CAMERA_TEXCO_FACTORS = (1 << 8),
- GPU_LOC_TO_VIEW_MATRIX = (1 << 9),
+ GPU_PARTICLE_SCALAR_PROPS = (1 << 9),
+ GPU_PARTICLE_LOCATION = (1 << 10),
+ GPU_PARTICLE_VELOCITY = (1 << 11),
+ GPU_PARTICLE_ANG_VELOCITY = (1 << 12),
+ GPU_LOC_TO_VIEW_MATRIX = (1 << 13),
GPU_INVERSE_LOC_TO_VIEW_MATRIX = (1 << 14),
} GPUBuiltin;
@@ -225,7 +230,7 @@ void GPU_material_bind(
float viewmat[4][4], float viewinv[4][4], float cameraborder[4], bool scenelock);
void GPU_material_bind_uniforms(
GPUMaterial *material, float obmat[4][4], float viewmat[4][4], float obcol[4],
- float autobumpscale);
+ float autobumpscale, GPUParticleInfo *pi);
void GPU_material_unbind(GPUMaterial *material);
bool GPU_material_bound(GPUMaterial *material);
struct Scene *GPU_material_scene(GPUMaterial *material);
@@ -334,6 +339,14 @@ void GPU_horizon_update_color(float color[3]);
void GPU_ambient_update_color(float color[3]);
void GPU_zenith_update_color(float color[3]);
+struct GPUParticleInfo
+{
+ float scalprops[4];
+ float location[3];
+ float velocity[3];
+ float angular_velocity[3];
+};
+
#ifdef WITH_OPENSUBDIV
struct DerivedMesh;
void GPU_material_update_fvar_offset(GPUMaterial *gpu_material,