diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-08-10 16:13:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-08-10 17:16:35 +0300 |
commit | bf6a22ed6f6bbe7db3e7796e83d32e071aae93cc (patch) | |
tree | aefa8c3e594d9d9fd761e12c0a825f199853b596 /source/blender/gpu/GPU_material.h | |
parent | c9bd61b37240ad000ae7ac4d49801e4afe3565b0 (diff) |
GPUMaterial: Group all colorband texture together
This lower the use of texture samplers slots and let users use more real
textures in their shaders.
This patch also make the ramp texture 16 bit floating point. Meaning you
can now use value greater than one in your color ramps.
With the limit of 128 colorband per shader (a color band being either a
color ramp, a wavelength node or a curve node (and maybe wavelength node in
the future)).
Only drawback with the current implementation is that it does not remove
colorband from pruned GPUNodes but it shouldn't really matter in practice.
This should fix T56010
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 9dcf308a414..6b0296361ec 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -80,6 +80,7 @@ typedef enum GPUType { GPU_MAT4 = 16, /* Values not in GPU_DATATYPE_STR */ + GPU_TEX1D_ARRAY = 1001, GPU_TEX2D = 1002, GPU_TEX3D = 1003, GPU_SHADOW2D = 1004, @@ -229,7 +230,7 @@ GPUNodeLink *GPU_uniform_buffer(float *num, GPUType gputype); GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser, bool is_data); GPUNodeLink *GPU_cube_map(struct Image *ima, struct ImageUser *iuser, bool is_data); GPUNodeLink *GPU_image_preview(struct PreviewImage *prv); -GPUNodeLink *GPU_texture(int size, float *pixels); +GPUNodeLink *GPU_texture_ramp(GPUMaterial *mat, int size, float *pixels, float *layer); GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, GPUDynamicType dynamictype, void *data); GPUNodeLink *GPU_builtin(GPUBuiltin builtin); GPUNodeLink *GPU_opengl_builtin(GPUOpenGLBuiltin builtin); |