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:
authorAntony Riakiotakis <kalast@gmail.com>2015-03-03 19:47:31 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-03-19 17:18:14 +0300
commit3e9947c4d4714a4752c768bb78fe6d227fc6be97 (patch)
tree1c21bc46db3bb15f9efeab0c5c0e5d2b8d75d74f /source/blender/gpu/GPU_extensions.h
parent93048873f10bab6ebcee9467a1e462f410f1bf12 (diff)
Depth of field high quality:
A new checkbox "High quality" is provided in camera settings to enable this. This creates a depth of field that is much closer to the rendered result and even supports aperture blades in the effect, but it's more expensive too. There are optimizations to do here since the technique is very fill rate heavy. People, be careful, this -can- lock up your screen if depth of field blurring is too extreme. Technical details: This uses geometry shaders + instancing and is an adaptation of techniques gathered from http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane- http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20- %20in%20Real-Time%20Rendering%20Course).ppt TODOs: * Support dithering to minimize banding. * Optimize fill rate in geometry shader.
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r--source/blender/gpu/GPU_extensions.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 985cebc8687..aed1a88938a 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -61,13 +61,14 @@ bool GPU_non_power_of_two_support(void);
bool GPU_vertex_buffer_support(void);
bool GPU_display_list_support(void);
bool GPU_bicubic_bump_support(void);
+bool GPU_geometry_shader_support(void);
+bool GPU_instanced_drawing_support(void);
int GPU_max_texture_size(void);
int GPU_color_depth(void);
void GPU_code_generate_glsl_lib(void);
-
/* GPU Types */
typedef enum GPUDeviceType {
@@ -120,7 +121,7 @@ GPUTexture *GPU_texture_create_2D(int w, int h, const float *pixels, GPUHDRType
GPUTexture *GPU_texture_create_3D(int w, int h, int depth, int channels, const float *fpixels);
GPUTexture *GPU_texture_create_depth(int w, int h, char err_out[256]);
GPUTexture *GPU_texture_create_vsm_shadow_map(int size, char err_out[256]);
-GPUTexture *GPU_texture_create_2D_procedural(int w, int h, const float *pixels, char err_out[256]);
+GPUTexture *GPU_texture_create_2D_procedural(int w, int h, const float *pixels, bool repeat, char err_out[256]);
GPUTexture *GPU_texture_create_1D_procedural(int w, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_from_blender(struct Image *ima,
struct ImageUser *iuser, bool is_data, double time, int mipmap);
@@ -136,7 +137,7 @@ void GPU_texture_ref(GPUTexture *tex);
void GPU_texture_bind(GPUTexture *tex, int number);
void GPU_texture_unbind(GPUTexture *tex);
-void GPU_depth_texture_mode(GPUTexture *tex, bool compare, bool use_filter);
+void GPU_texture_filter_mode(GPUTexture *tex, bool compare, bool use_filter);
GPUFrameBuffer *GPU_texture_framebuffer(GPUTexture *tex);
@@ -183,7 +184,7 @@ int GPU_offscreen_height(const GPUOffScreen *ofs);
* - only for fragment shaders now
* - must call texture bind before setting a texture as uniform! */
-GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const char *libcode, const char *defines);
+GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const char *geocode, const char *libcode, const char *defines);
void GPU_shader_free(GPUShader *shader);
void GPU_shader_bind(GPUShader *shader);
@@ -192,8 +193,12 @@ void GPU_shader_unbind(void);
int GPU_shader_get_uniform(GPUShader *shader, const char *name);
void GPU_shader_uniform_vector(GPUShader *shader, int location, int length,
int arraysize, const float *value);
+void GPU_shader_uniform_vector_int(GPUShader *shader, int location, int length,
+ int arraysize, const int *value);
+
void GPU_shader_uniform_texture(GPUShader *shader, int location, GPUTexture *tex);
void GPU_shader_uniform_int(GPUShader *shader, int location, int value);
+void GPU_shader_geometry_stage_primitive_io(GPUShader *shader, int input, int output, int number);
int GPU_shader_get_attribute(GPUShader *shader, const char *name);