Merge branch 'master' into blender2.8
[blender.git] / source / blender / gpu / intern / gpu_material.c
index b857aea29adac1cdb3c3672196084d185112ec02..3e8f0baf7b03fbc020fdf5adb0e5d860044cfcab 100644 (file)
@@ -117,11 +117,6 @@ struct GPUMaterial {
        int obcolloc, obautobumpscaleloc;
        int cameratexcofacloc;
 
-       int partscalarpropsloc;
-       int partcoloc;
-       int partvel;
-       int partangvel;
-
        ListBase lamps;
        bool bound;
 
@@ -260,14 +255,6 @@ static int GPU_material_construct_end(GPUMaterial *material, const char *passnam
                        material->obautobumpscaleloc = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_AUTO_BUMPSCALE));
                if (material->builtins & GPU_CAMERA_TEXCO_FACTORS)
                        material->cameratexcofacloc = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_CAMERA_TEXCO_FACTORS));
-               if (material->builtins & GPU_PARTICLE_SCALAR_PROPS)
-                       material->partscalarpropsloc = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_PARTICLE_SCALAR_PROPS));
-               if (material->builtins & GPU_PARTICLE_LOCATION)
-                       material->partcoloc = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_PARTICLE_LOCATION));
-               if (material->builtins & GPU_PARTICLE_VELOCITY)
-                       material->partvel = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_PARTICLE_VELOCITY));
-               if (material->builtins & GPU_PARTICLE_ANG_VELOCITY)
-                       material->partangvel = GPU_shader_get_uniform(shader, GPU_builtin_name(GPU_PARTICLE_ANG_VELOCITY));
                return 1;
        }
        else {
@@ -400,7 +387,7 @@ void GPU_material_bind(
 
 void GPU_material_bind_uniforms(
         GPUMaterial *material, float obmat[4][4], float viewmat[4][4], float obcol[4],
-        float autobumpscale, GPUParticleInfo *pi)
+        float autobumpscale)
 {
        if (material->pass) {
                GPUShader *shader = GPU_pass_shader(material->pass);
@@ -437,18 +424,6 @@ void GPU_material_bind_uniforms(
                if (material->builtins & GPU_AUTO_BUMPSCALE) {
                        GPU_shader_uniform_vector(shader, material->obautobumpscaleloc, 1, 1, &autobumpscale);
                }
-               if (material->builtins & GPU_PARTICLE_SCALAR_PROPS) {
-                       GPU_shader_uniform_vector(shader, material->partscalarpropsloc, 4, 1, pi->scalprops);
-               }
-               if (material->builtins & GPU_PARTICLE_LOCATION) {
-                       GPU_shader_uniform_vector(shader, material->partcoloc, 3, 1, pi->location);
-               }
-               if (material->builtins & GPU_PARTICLE_VELOCITY) {
-                       GPU_shader_uniform_vector(shader, material->partvel, 3, 1, pi->velocity);
-               }
-               if (material->builtins & GPU_PARTICLE_ANG_VELOCITY) {
-                       GPU_shader_uniform_vector(shader, material->partangvel, 3, 1, pi->angular_velocity);
-               }
 
        }
 }
@@ -2409,7 +2384,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
                                return lamp;
                        }
                
-                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->depthtex, 0, NULL)) {
+                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->depthtex, 0)) {
                                gpu_lamp_shadow_free(lamp);
                                return lamp;
                        }
@@ -2421,7 +2396,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
                                return lamp;
                        }
 
-                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0, NULL)) {
+                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0)) {
                                gpu_lamp_shadow_free(lamp);
                                return lamp;
                        }
@@ -2444,7 +2419,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
                                return lamp;
                        }
                
-                       if (!GPU_framebuffer_texture_attach(lamp->blurfb, lamp->blurtex, 0, NULL)) {
+                       if (!GPU_framebuffer_texture_attach(lamp->blurfb, lamp->blurtex, 0)) {
                                gpu_lamp_shadow_free(lamp);
                                return lamp;
                        }
@@ -2466,7 +2441,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
                                return lamp;
                        }
 
-                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0, NULL)) {
+                       if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0)) {
                                gpu_lamp_shadow_free(lamp);
                                return lamp;
                        }