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:
authorClément Foucault <foucault.clem@gmail.com>2018-10-09 19:34:25 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-10-09 20:08:25 +0300
commitbb83bd773c855d3989770d2f87c4a88a255152ed (patch)
tree7ce82739e67a53a400e04301c41f0036f0afc7fd /source/blender/gpu
parent2c0f02dd0a886ee0e6869a35ab901c0fa8d822eb (diff)
Cleanup: Remove old smoke drawing code
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt3
-rw-r--r--source/blender/gpu/GPU_shader.h5
-rw-r--r--source/blender/gpu/intern/gpu_shader.c17
-rw-r--r--source/blender/gpu/shaders/gpu_shader_fire_frag.glsl15
-rw-r--r--source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl47
-rw-r--r--source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl15
6 files changed, 0 insertions, 102 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index e8c3a19b77e..0b38a814aec 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -239,9 +239,6 @@ data_to_c_simple(shaders/gpu_shader_keyframe_diamond_vert.glsl SRC)
data_to_c_simple(shaders/gpu_shader_keyframe_diamond_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_fire_frag.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_smoke_frag.glsl SRC)
-data_to_c_simple(shaders/gpu_shader_smoke_vert.glsl SRC)
data_to_c_simple(shaders/gpu_shader_material.glsl SRC)
data_to_c_simple(shaders/gpu_shader_gpencil_stroke_vert.glsl SRC)
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index b53e6f108e7..308205339db 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -101,11 +101,6 @@ int GPU_shader_get_attribute(GPUShader *shader, const char *name);
/* Builtin/Non-generated shaders */
typedef enum GPUBuiltinShader {
- /* UNUSED (TODO REMOVE) */
- GPU_SHADER_SMOKE,
- GPU_SHADER_SMOKE_FIRE,
- GPU_SHADER_SMOKE_COBA,
-
/* specialized drawing */
GPU_SHADER_TEXT,
GPU_SHADER_TEXT_SIMPLE,
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 274ad1c8c0c..d428e2f9bd9 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -167,10 +167,6 @@ extern char datatoc_gpu_shader_text_simple_geom_glsl[];
extern char datatoc_gpu_shader_keyframe_diamond_vert_glsl[];
extern char datatoc_gpu_shader_keyframe_diamond_frag_glsl[];
-extern char datatoc_gpu_shader_fire_frag_glsl[];
-extern char datatoc_gpu_shader_smoke_vert_glsl[];
-extern char datatoc_gpu_shader_smoke_frag_glsl[];
-
extern char datatoc_gpu_shader_gpencil_stroke_vert_glsl[];
extern char datatoc_gpu_shader_gpencil_stroke_frag_glsl[];
extern char datatoc_gpu_shader_gpencil_stroke_geom_glsl[];
@@ -664,16 +660,6 @@ int GPU_shader_get_attribute(GPUShader *shader, const char *name)
}
static const GPUShaderStages builtin_shader_stages[GPU_NUM_BUILTIN_SHADERS] = {
- [GPU_SHADER_SMOKE] =
- { datatoc_gpu_shader_smoke_vert_glsl,
- datatoc_gpu_shader_smoke_frag_glsl },
- [GPU_SHADER_SMOKE_FIRE] =
- { datatoc_gpu_shader_smoke_vert_glsl,
- datatoc_gpu_shader_smoke_frag_glsl },
- [GPU_SHADER_SMOKE_COBA] =
- { datatoc_gpu_shader_smoke_vert_glsl,
- datatoc_gpu_shader_smoke_frag_glsl },
-
[GPU_SHADER_TEXT] =
{ datatoc_gpu_shader_text_vert_glsl,
datatoc_gpu_shader_text_frag_glsl,
@@ -997,9 +983,6 @@ static const char *gpu_shader_get_builtin_shader_defines(
case GPU_SHADER_2D_NODELINK_INST:
return "#define USE_INSTANCE\n";
- case GPU_SHADER_SMOKE_COBA:
- return "#define USE_COBA\n";
-
case GPU_SHADER_INSTANCE_VARIYING_ID_VARIYING_SIZE:
case GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE:
return "#define UNIFORM_SCALE\n";
diff --git a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl
deleted file mode 100644
index fc9cafb6b02..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl
+++ /dev/null
@@ -1,15 +0,0 @@
-
-in vec3 coords;
-out vec4 fragColor;
-
-uniform sampler3D flame_texture;
-uniform sampler1D spectrum_texture;
-
-void main()
-{
- float flame = texture(flame_texture, coords).r;
- vec4 emission = texture(spectrum_texture, flame);
-
- fragColor.rgb = emission.a * emission.rgb;
- fragColor.a = emission.a;
-}
diff --git a/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl b/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl
deleted file mode 100644
index b57bd5b6a37..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_smoke_frag.glsl
+++ /dev/null
@@ -1,47 +0,0 @@
-
-in vec3 coords;
-out vec4 fragColor;
-
-uniform vec3 active_color;
-uniform float step_size;
-uniform float density_scale;
-
-uniform sampler3D soot_texture;
-uniform sampler3D shadow_texture;
-
-#ifdef USE_COBA
-uniform sampler1D transfer_texture;
-uniform sampler3D color_band_texture;
-#endif
-
-void main()
-{
- /* compute color and density from volume texture */
- vec4 soot = texture(soot_texture, coords);
-
-#ifndef USE_COBA
- vec3 soot_color;
- if (soot.a != 0) {
- soot_color = active_color * soot.rgb / soot.a;
- }
- else {
- soot_color = vec3(0);
- }
- float soot_density = density_scale * soot.a;
-
- /* compute transmittance and alpha */
- float soot_transmittance = pow(2.71828182846, -soot_density * step_size);
- float soot_alpha = 1.0 - soot_transmittance;
-
- /* shade */
- float shadow = texture(shadow_texture, coords).r;
- soot_color *= soot_transmittance * shadow;
-
- /* premultiply alpha */
- fragColor = vec4(soot_alpha * soot_color, soot_alpha);
-#else
- float color_band = texture(color_band_texture, coords).r;
- vec4 transfer_function = texture(transfer_texture, color_band);
- fragColor = transfer_function * density_scale;
-#endif
-}
diff --git a/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl b/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl
deleted file mode 100644
index 8c30e9baf9e..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_smoke_vert.glsl
+++ /dev/null
@@ -1,15 +0,0 @@
-
-uniform mat4 ModelViewProjectionMatrix;
-
-out vec3 coords;
-
-uniform vec3 min_location;
-uniform vec3 invsize;
-uniform vec3 ob_sizei;
-
-void main()
-{
- // TODO: swap gl_Vertex for vec3 pos, update smoke setup code
- gl_Position = ModelViewProjectionMatrix * vec4(gl_Vertex.xyz * ob_sizei, 1.0);
- coords = (gl_Vertex.xyz - min_location) * invsize;
-}