diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 10:17:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-20 10:25:27 +0300 |
commit | 4fa904e91c78148ba39ac40371d7680294e225bf (patch) | |
tree | ec6c1c6f6a1263e29900bedc9e876d941cc3febf /source/blender/draw/engines/eevee | |
parent | db5a82302cb322b24d0e0a315e6af499706e8aca (diff) |
Cleanup: use lowercase for dimensions in function names
Most API's already use this convention.
Diffstat (limited to 'source/blender/draw/engines/eevee')
15 files changed, 66 insertions, 66 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_bloom.c b/source/blender/draw/engines/eevee/eevee_bloom.c index 058215bc8ff..cd3e1cd6503 100644 --- a/source/blender/draw/engines/eevee/eevee_bloom.c +++ b/source/blender/draw/engines/eevee/eevee_bloom.c @@ -105,7 +105,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata) effects->blit_texel_size[0] = 1.0f / (float)blitsize[0]; effects->blit_texel_size[1] = 1.0f / (float)blitsize[1]; - effects->bloom_blit = DRW_texture_pool_query_2D(blitsize[0], blitsize[1], GPU_R11F_G11F_B10F, + effects->bloom_blit = DRW_texture_pool_query_2d(blitsize[0], blitsize[1], GPU_R11F_G11F_B10F, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->bloom_blit_fb, { @@ -147,7 +147,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata) effects->downsamp_texel_size[i][0] = 1.0f / (float)texsize[0]; effects->downsamp_texel_size[i][1] = 1.0f / (float)texsize[1]; - effects->bloom_downsample[i] = DRW_texture_pool_query_2D(texsize[0], texsize[1], GPU_R11F_G11F_B10F, + effects->bloom_downsample[i] = DRW_texture_pool_query_2d(texsize[0], texsize[1], GPU_R11F_G11F_B10F, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->bloom_down_fb[i], { GPU_ATTACHMENT_NONE, @@ -163,7 +163,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata) texsize[0] = MAX2(texsize[0], 2); texsize[1] = MAX2(texsize[1], 2); - effects->bloom_upsample[i] = DRW_texture_pool_query_2D(texsize[0], texsize[1], GPU_R11F_G11F_B10F, + effects->bloom_upsample[i] = DRW_texture_pool_query_2d(texsize[0], texsize[1], GPU_R11F_G11F_B10F, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->bloom_accum_fb[i], { GPU_ATTACHMENT_NONE, diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c index 00d9420004b..7aa1e48472f 100644 --- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c +++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c @@ -97,11 +97,11 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v eGPUTextureFormat down_format = DRW_state_draw_background() ? GPU_R11F_G11F_B10F : GPU_RGBA16F; - effects->dof_down_near = DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], down_format, + effects->dof_down_near = DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], down_format, &draw_engine_eevee_type); - effects->dof_down_far = DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], down_format, + effects->dof_down_far = DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], down_format, &draw_engine_eevee_type); - effects->dof_coc = DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], GPU_RG16F, + effects->dof_coc = DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], GPU_RG16F, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->dof_down_fb, { @@ -114,7 +114,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v /* Go full 32bits for rendering and reduce the color artifacts. */ eGPUTextureFormat fb_format = DRW_state_is_image_render() ? GPU_RGBA32F : GPU_RGBA16F; - effects->dof_blur = DRW_texture_pool_query_2D(buffer_size[0] * 2, buffer_size[1], fb_format, + effects->dof_blur = DRW_texture_pool_query_2d(buffer_size[0] * 2, buffer_size[1], fb_format, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->dof_scatter_fb, { @@ -123,7 +123,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v }); if (!DRW_state_draw_background()) { - effects->dof_blur_alpha = DRW_texture_pool_query_2D(buffer_size[0] * 2, buffer_size[1], GPU_R32F, + effects->dof_blur_alpha = DRW_texture_pool_query_2d(buffer_size[0] * 2, buffer_size[1], GPU_R32F, &draw_engine_eevee_type); GPU_framebuffer_texture_attach(fbl->dof_scatter_fb, effects->dof_blur_alpha, 1, 0); } diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index 9cb678bb875..9de01bf140b 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -110,7 +110,7 @@ static void eevee_create_shader_downsample(void) #define SETUP_BUFFER(tex, fb, fb_color) { \ eGPUTextureFormat format = (DRW_state_is_scene_render()) ? GPU_RGBA32F : GPU_RGBA16F; \ - DRW_texture_ensure_fullscreen_2D(&tex, format, DRW_TEX_FILTER | DRW_TEX_MIPMAP); \ + DRW_texture_ensure_fullscreen_2d(&tex, format, DRW_TEX_FILTER | DRW_TEX_MIPMAP); \ GPU_framebuffer_ensure_config(&fb, { \ GPU_ATTACHMENT_TEXTURE(dtxl->depth), \ GPU_ATTACHMENT_TEXTURE(tex), \ @@ -193,10 +193,10 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY)) { /* Intel gpu seems to have problem rendering to only depth format */ - DRW_texture_ensure_2D(&txl->maxzbuffer, size[0], size[1], GPU_R32F, DRW_TEX_MIPMAP); + DRW_texture_ensure_2d(&txl->maxzbuffer, size[0], size[1], GPU_R32F, DRW_TEX_MIPMAP); } else { - DRW_texture_ensure_2D(&txl->maxzbuffer, size[0], size[1], GPU_DEPTH_COMPONENT24, DRW_TEX_MIPMAP); + DRW_texture_ensure_2d(&txl->maxzbuffer, size[0], size[1], GPU_DEPTH_COMPONENT24, DRW_TEX_MIPMAP); } if (fbl->downsample_fb == NULL) { @@ -217,7 +217,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object * Normal buffer for deferred passes. */ if ((effects->enabled_effects & EFFECT_NORMAL_BUFFER) != 0) { - effects->ssr_normal_input = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], GPU_RG16, + effects->ssr_normal_input = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], GPU_RG16, &draw_engine_eevee_type); GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_normal_input, 1, 0); @@ -230,7 +230,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object * Motion vector buffer for correct TAA / motion blur. */ if ((effects->enabled_effects & EFFECT_VELOCITY_BUFFER) != 0) { - effects->velocity_tx = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], GPU_RG16, + effects->velocity_tx = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], GPU_RG16, &draw_engine_eevee_type); /* TODO output objects velocity during the mainpass. */ @@ -249,7 +249,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object * Setup depth double buffer. */ if ((effects->enabled_effects & EFFECT_DEPTH_DOUBLE_BUFFER) != 0) { - DRW_texture_ensure_fullscreen_2D(&txl->depth_double_buffer, GPU_DEPTH24_STENCIL8, 0); + DRW_texture_ensure_fullscreen_2d(&txl->depth_double_buffer, GPU_DEPTH24_STENCIL8, 0); GPU_framebuffer_ensure_config(&fbl->double_buffer_depth_fb, { GPU_ATTACHMENT_TEXTURE(txl->depth_double_buffer) diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index b1e2f12788d..50062088dbe 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -61,7 +61,7 @@ static void eevee_engine_init(void *ved) stl->g_data->valid_taa_history = (txl->taa_history != NULL); /* Main Buffer */ - DRW_texture_ensure_fullscreen_2D(&txl->color, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); + DRW_texture_ensure_fullscreen_2d(&txl->color, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); GPU_framebuffer_ensure_config(&fbl->main_fb, { GPU_ATTACHMENT_TEXTURE(dtxl->depth), @@ -203,7 +203,7 @@ static void eevee_draw_background(void *vedata) int samp = taa_use_reprojection ? stl->effects->taa_reproject_sample + 1 : stl->effects->taa_current_sample; - BLI_halton_3D(primes, offset, samp, r); + BLI_halton_3d(primes, offset, samp, r); EEVEE_update_noise(psl, fbl, r); EEVEE_volumes_set_jitter(sldata, samp - 1); EEVEE_materials_init(sldata, stl, fbl); diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 45ed66859af..cf2d27e4cc9 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -249,12 +249,12 @@ LightCache *EEVEE_lightcache_create( light_cache->cube_data = MEM_callocN(sizeof(EEVEE_LightProbe) * cube_len, "EEVEE_LightProbe"); light_cache->grid_data = MEM_callocN(sizeof(EEVEE_LightGrid) * grid_len, "EEVEE_LightGrid"); - light_cache->grid_tx.tex = DRW_texture_create_2D_array(irr_size[0], irr_size[1], irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL); + light_cache->grid_tx.tex = DRW_texture_create_2d_array(irr_size[0], irr_size[1], irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL); light_cache->grid_tx.tex_size[0] = irr_size[0]; light_cache->grid_tx.tex_size[1] = irr_size[1]; light_cache->grid_tx.tex_size[2] = irr_size[2]; - light_cache->cube_tx.tex = DRW_texture_create_2D_array(cube_size, cube_size, cube_len, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL); + light_cache->cube_tx.tex = DRW_texture_create_2d_array(cube_size, cube_size, cube_len, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL); light_cache->cube_tx.tex_size[0] = cube_size; light_cache->cube_tx.tex_size[1] = cube_size; light_cache->cube_tx.tex_size[2] = cube_len; @@ -461,7 +461,7 @@ static void eevee_lightbake_create_resources(EEVEE_LightBake *lbake) lbake->cube_prb = MEM_callocN(sizeof(LightProbe *) * lbake->cube_len, "EEVEE Cube visgroup ptr"); lbake->grid_prb = MEM_callocN(sizeof(LightProbe *) * lbake->grid_len, "EEVEE Grid visgroup ptr"); - lbake->grid_prev = DRW_texture_create_2D_array( + lbake->grid_prev = DRW_texture_create_2d_array( lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL); @@ -727,7 +727,7 @@ static void eevee_lightbake_copy_irradiance(EEVEE_LightBake *lbake, LightCache * /* Copy texture by reading back and reuploading it. */ float *tex = GPU_texture_read(lcache->grid_tx.tex, GPU_DATA_FLOAT, 0); - lbake->grid_prev = DRW_texture_create_2D_array(lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2], + lbake->grid_prev = DRW_texture_create_2d_array(lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, tex); MEM_freeN(tex); diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index 04e2cbb37ab..c0dd9a81313 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -98,13 +98,13 @@ static struct GPUTexture *create_hammersley_sample_texture(int samples) for (i = 0; i < samples; i++) { double dphi; - BLI_hammersley_1D(i, &dphi); + BLI_hammersley_1d(i, &dphi); float phi = (float)dphi * 2.0f * M_PI; texels[i][0] = cosf(phi); texels[i][1] = sinf(phi); } - tex = DRW_texture_create_1D(samples, GPU_RG16F, DRW_TEX_WRAP, (float *)texels); + tex = DRW_texture_create_1d(samples, GPU_RG16F, DRW_TEX_WRAP, (float *)texels); MEM_freeN(texels); return tex; } @@ -129,15 +129,15 @@ static void planar_pool_ensure_alloc(EEVEE_Data *vedata, int num_planar_ref) /* We need an Array texture so allocate it ourself */ if (!txl->planar_pool) { if (num_planar_ref > 0) { - txl->planar_pool = DRW_texture_create_2D_array(width, height, max_ff(1, num_planar_ref), + txl->planar_pool = DRW_texture_create_2d_array(width, height, max_ff(1, num_planar_ref), GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL); - txl->planar_depth = DRW_texture_create_2D_array(width, height, max_ff(1, num_planar_ref), + txl->planar_depth = DRW_texture_create_2d_array(width, height, max_ff(1, num_planar_ref), GPU_DEPTH_COMPONENT24, 0, NULL); } else if (num_planar_ref == 0) { /* Makes Opengl Happy : Create a placeholder texture that will never be sampled but still bound to shader. */ - txl->planar_pool = DRW_texture_create_2D_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL); - txl->planar_depth = DRW_texture_create_2D_array(1, 1, 1, GPU_DEPTH_COMPONENT24, 0, NULL); + txl->planar_pool = DRW_texture_create_2d_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL); + txl->planar_depth = DRW_texture_create_2d_array(1, 1, 1, GPU_DEPTH_COMPONENT24, 0, NULL); } } } @@ -196,7 +196,7 @@ void EEVEE_lightprobes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* Placeholder planar pool: used when rendering planar reflections (avoid dependency loop). */ if (!e_data.planar_pool_placeholder) { - e_data.planar_pool_placeholder = DRW_texture_create_2D_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER, NULL); + e_data.planar_pool_placeholder = DRW_texture_create_2d_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER, NULL); } } diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c index 05e5127f950..b27aa159a94 100644 --- a/source/blender/draw/engines/eevee/eevee_lights.c +++ b/source/blender/draw/engines/eevee/eevee_lights.c @@ -555,7 +555,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) linfo->shadow_cube_size, shadow_pool_format, DRW_TEX_FILTER, NULL); } if (!sldata->shadow_cube_pool) { - sldata->shadow_cube_pool = DRW_texture_create_2D_array( + sldata->shadow_cube_pool = DRW_texture_create_2d_array( linfo->shadow_cube_store_size, linfo->shadow_cube_store_size, max_ii(1, linfo->num_cube_layer), shadow_pool_format, DRW_TEX_FILTER, NULL); } @@ -569,13 +569,13 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* CSM */ if (!sldata->shadow_cascade_target) { - sldata->shadow_cascade_target = DRW_texture_create_2D_array( + sldata->shadow_cascade_target = DRW_texture_create_2d_array( linfo->shadow_cascade_size, linfo->shadow_cascade_size, MAX_CASCADE_NUM, GPU_DEPTH_COMPONENT24, 0, NULL); - sldata->shadow_cascade_blur = DRW_texture_create_2D_array( + sldata->shadow_cascade_blur = DRW_texture_create_2d_array( linfo->shadow_cascade_size, linfo->shadow_cascade_size, MAX_CASCADE_NUM, shadow_pool_format, DRW_TEX_FILTER, NULL); } if (!sldata->shadow_cascade_pool) { - sldata->shadow_cascade_pool = DRW_texture_create_2D_array( + sldata->shadow_cascade_pool = DRW_texture_create_2d_array( linfo->shadow_cascade_size, linfo->shadow_cascade_size, max_ii(1, linfo->num_cascade_layer), shadow_pool_format, DRW_TEX_FILTER, NULL); } @@ -728,7 +728,7 @@ static void sample_ball(int sample_ofs, float radius, float rsample[3]) double ht_offset[3] = {0.0, 0.0, 0.0}; uint ht_primes[3] = {2, 3, 7}; - BLI_halton_3D(ht_primes, ht_offset, sample_ofs, ht_point); + BLI_halton_3d(ht_primes, ht_offset, sample_ofs, ht_point); float omega = ht_point[1] * 2.0f * M_PI; @@ -751,7 +751,7 @@ static void sample_rectangle( double ht_offset[2] = {0.0, 0.0}; uint ht_primes[2] = {2, 3}; - BLI_halton_2D(ht_primes, ht_offset, sample_ofs, ht_point); + BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point); /* Change ditribution center to be 0,0 */ ht_point[0] = (ht_point[0] > 0.5f) ? ht_point[0] - 1.0f : ht_point[0]; @@ -770,7 +770,7 @@ static void sample_ellipse( double ht_offset[2] = {0.0, 0.0}; uint ht_primes[2] = {2, 3}; - BLI_halton_2D(ht_primes, ht_offset, sample_ofs, ht_point); + BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point); /* Uniform disc sampling. */ float omega = ht_point[1] * 2.0f * M_PI; diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 44daa7e34f3..cfe493cf3e4 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -137,7 +137,7 @@ static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h)) float *texels = MEM_mallocN(sizeof(float[2]) * w * h, "lut"); - tex = DRW_texture_create_2D(w, h, GPU_RG16F, DRW_TEX_FILTER, (float *)texels); + tex = DRW_texture_create_2d(w, h, GPU_RG16F, DRW_TEX_FILTER, (float *)texels); DRWFboTexture tex_filter = {&tex, GPU_RG16F, DRW_TEX_FILTER}; GPU_framebuffer_init(&fb, &draw_engine_eevee_type, w, h, &tex_filter, 1); @@ -199,7 +199,7 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h) float *texels = MEM_mallocN(sizeof(float[2]) * w * h, "lut"); - tex = DRW_texture_create_2D(w, h, GPU_R16F, DRW_TEX_FILTER, (float *)texels); + tex = DRW_texture_create_2d(w, h, GPU_R16F, DRW_TEX_FILTER, (float *)texels); DRWFboTexture tex_filter = {&tex, GPU_R16F, DRW_TEX_FILTER}; GPU_framebuffer_init(&fb, &draw_engine_eevee_type, w, h, &tex_filter, 1); @@ -438,7 +438,7 @@ static void eevee_init_dummys(void) static void eevee_init_noise_texture(void) { - e_data.noise_tex = DRW_texture_create_2D(64, 64, GPU_RGBA16F, 0, (float *)blue_noise); + e_data.noise_tex = DRW_texture_create_2d(64, 64, GPU_RGBA16F, 0, (float *)blue_noise); } static void eevee_init_util_texture(void) @@ -490,7 +490,7 @@ static void eevee_init_util_texture(void) texels_layer += 64 * 64; } - e_data.util_tex = DRW_texture_create_2D_array( + e_data.util_tex = DRW_texture_create_2d_array( 64, 64, layers, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_WRAP, (float *)texels); MEM_freeN(texels); @@ -640,7 +640,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_StorageList *stl, E } else { double r; - BLI_halton_1D(5, 0.0, stl->effects->taa_current_sample - 1, &r); + BLI_halton_1d(5, 0.0, stl->effects->taa_current_sample - 1, &r); e_data.alpha_hash_offset = (float)r; e_data.alpha_hash_scale = 0.01f; } diff --git a/source/blender/draw/engines/eevee/eevee_mist.c b/source/blender/draw/engines/eevee/eevee_mist.c index 315a87776ef..9a75ba91fa5 100644 --- a/source/blender/draw/engines/eevee/eevee_mist.c +++ b/source/blender/draw/engines/eevee/eevee_mist.c @@ -67,7 +67,7 @@ void EEVEE_mist_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) } /* Create FrameBuffer. */ - DRW_texture_ensure_fullscreen_2D(&txl->mist_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */ + DRW_texture_ensure_fullscreen_2d(&txl->mist_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */ GPU_framebuffer_ensure_config(&fbl->mist_accum_fb, { GPU_ATTACHMENT_NONE, diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c index 8b0eba7cc6f..5e95755ea76 100644 --- a/source/blender/draw/engines/eevee/eevee_occlusion.c +++ b/source/blender/draw/engines/eevee/eevee_occlusion.c @@ -99,7 +99,7 @@ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) common_data->ao_bounce_fac = (scene_eval->eevee.flag & SCE_EEVEE_GTAO_BOUNCE) ? 1.0f : 0.0f; - effects->gtao_horizons = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA8, + effects->gtao_horizons = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA8, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->gtao_fb, { GPU_ATTACHMENT_NONE, @@ -107,7 +107,7 @@ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) }); if (G.debug_value == 6) { - effects->gtao_horizons_debug = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA8, + effects->gtao_horizons_debug = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA8, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->gtao_debug_fb, { GPU_ATTACHMENT_NONE, @@ -144,7 +144,7 @@ void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); float clear[4] = {0.0f, 0.0f, 0.0f, 0.0f}; - DRW_texture_ensure_fullscreen_2D(&txl->ao_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */ + DRW_texture_ensure_fullscreen_2d(&txl->ao_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */ GPU_framebuffer_ensure_config(&fbl->ao_accum_fb, { GPU_ATTACHMENT_NONE, diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index 82cca4f653c..b7b592decd0 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -84,8 +84,8 @@ void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph * size_orig[1] + g_data->overscan_pixels * 2.0f}); /* TODO 32 bit depth */ - DRW_texture_ensure_fullscreen_2D(&dtxl->depth, GPU_DEPTH24_STENCIL8, 0); - DRW_texture_ensure_fullscreen_2D(&txl->color, GPU_RGBA32F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); + DRW_texture_ensure_fullscreen_2d(&dtxl->depth, GPU_DEPTH24_STENCIL8, 0); + DRW_texture_ensure_fullscreen_2d(&txl->color, GPU_RGBA32F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); GPU_framebuffer_ensure_config(&dfbl->default_fb, { GPU_ATTACHMENT_TEXTURE(dtxl->depth), @@ -509,7 +509,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl /* Copy previous persmat to UBO data */ copy_m4_m4(sldata->common_data.prev_persmat, stl->effects->prev_persmat); - BLI_halton_3D(primes, offset, stl->effects->taa_current_sample, r); + BLI_halton_3d(primes, offset, stl->effects->taa_current_sample, r); EEVEE_update_noise(psl, fbl, r); EEVEE_temporal_sampling_matrices_calc(stl->effects, g_data->viewmat, g_data->persmat, r); EEVEE_volumes_set_jitter(sldata, stl->effects->taa_current_sample - 1); diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c index 113cd359b2e..fe8d35f1d79 100644 --- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c +++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c @@ -121,7 +121,7 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) if (use_refraction) { /* TODO: Opti: Could be shared. */ - DRW_texture_ensure_fullscreen_2D(&txl->refract_color, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); + DRW_texture_ensure_fullscreen_2d(&txl->refract_color, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP); GPU_framebuffer_ensure_config(&fbl->refract_fb, { GPU_ATTACHMENT_NONE, @@ -156,15 +156,15 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) const eGPUTextureFormat format = (high_qual_input) ? GPU_RGBA16F : GPU_RGBA8; /* MRT for the shading pass in order to output needed data for the SSR pass. */ - effects->ssr_specrough_input = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], format, + effects->ssr_specrough_input = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], format, &draw_engine_eevee_type); GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_specrough_input, 2, 0); /* Raytracing output */ - effects->ssr_hit_output = DRW_texture_pool_query_2D(tracing_res[0], tracing_res[1], GPU_RG16I, + effects->ssr_hit_output = DRW_texture_pool_query_2d(tracing_res[0], tracing_res[1], GPU_RG16I, &draw_engine_eevee_type); - effects->ssr_pdf_output = DRW_texture_pool_query_2D(tracing_res[0], tracing_res[1], GPU_R16F, + effects->ssr_pdf_output = DRW_texture_pool_query_2d(tracing_res[0], tracing_res[1], GPU_R16F, &draw_engine_eevee_type); GPU_framebuffer_ensure_config(&fbl->screen_tracing_fb, { diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c b/source/blender/draw/engines/eevee/eevee_subsurface.c index 49bea1fb01e..5954774b00e 100644 --- a/source/blender/draw/engines/eevee/eevee_subsurface.c +++ b/source/blender/draw/engines/eevee/eevee_subsurface.c @@ -86,11 +86,11 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) * as the depth buffer we are sampling from. This could be avoided if the stencil is * a separate texture but that needs OpenGL 4.4 or ARB_texture_stencil8. * OR OpenGL 4.3 / ARB_ES3_compatibility if using a renderbuffer instead */ - effects->sss_stencil = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_DEPTH24_STENCIL8, + effects->sss_stencil = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_DEPTH24_STENCIL8, &draw_engine_eevee_type); - effects->sss_blur = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA16F, + effects->sss_blur = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA16F, &draw_engine_eevee_type); - effects->sss_data = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA16F, + effects->sss_data = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA16F, &draw_engine_eevee_type); GPUTexture *stencil_tex = effects->sss_stencil; @@ -123,7 +123,7 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) }); if (effects->sss_separate_albedo) { - effects->sss_albedo = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_R11F_G11F_B10F, + effects->sss_albedo = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_R11F_G11F_B10F, &draw_engine_eevee_type); } else { @@ -160,8 +160,8 @@ void EEVEE_subsurface_output_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Dat const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph); if (scene_eval->eevee.flag & SCE_EEVEE_SSS_ENABLED) { - DRW_texture_ensure_fullscreen_2D(&txl->sss_dir_accum, GPU_RGBA16F, 0); - DRW_texture_ensure_fullscreen_2D(&txl->sss_col_accum, GPU_RGBA16F, 0); + DRW_texture_ensure_fullscreen_2d(&txl->sss_dir_accum, GPU_RGBA16F, 0); + DRW_texture_ensure_fullscreen_2d(&txl->sss_col_accum, GPU_RGBA16F, 0); GPUTexture *stencil_tex = effects->sss_stencil; diff --git a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c index 592d11916ac..fd3a23b36e0 100644 --- a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c +++ b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c @@ -231,7 +231,7 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data double ht_offset[2] = {0.0, 0.0}; uint ht_primes[2] = {2, 3}; - BLI_halton_2D(ht_primes, ht_offset, effects->taa_current_sample - 1, ht_point); + BLI_halton_2d(ht_primes, ht_offset, effects->taa_current_sample - 1, ht_point); EEVEE_temporal_sampling_matrices_calc(effects, viewmat, persmat, ht_point); diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 6bdf3aaca56..7262b3d446a 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -136,7 +136,7 @@ void EEVEE_volumes_set_jitter(EEVEE_ViewLayerData *sldata, uint current_sample) double ht_offset[3] = {0.0, 0.0}; uint ht_primes[3] = {3, 7, 2}; - BLI_halton_3D(ht_primes, ht_offset, current_sample, ht_point); + BLI_halton_3d(ht_primes, ht_offset, current_sample, ht_point); common_data->vol_jitter[0] = (float)ht_point[0]; common_data->vol_jitter[1] = (float)ht_point[1]; @@ -209,30 +209,30 @@ int EEVEE_volumes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) if (txl->volume_prop_scattering == NULL) { /* Volume properties: We evaluate all volumetric objects * and store their final properties into each froxel */ - txl->volume_prop_scattering = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_prop_scattering = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); - txl->volume_prop_extinction = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_prop_extinction = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); - txl->volume_prop_emission = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_prop_emission = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); - txl->volume_prop_phase = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_prop_phase = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_RG16F, DRW_TEX_FILTER, NULL); /* Volume scattering: We compute for each froxel the * Scattered light towards the view. We also resolve temporal * super sampling during this stage. */ - txl->volume_scatter = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_scatter = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); - txl->volume_transmittance = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_transmittance = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); /* Final integration: We compute for each froxel the * amount of scattered light and extinction coef at this * given depth. We use theses textures as double buffer * for the volumetric history. */ - txl->volume_scatter_history = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_scatter_history = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); - txl->volume_transmittance_history = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2], + txl->volume_transmittance_history = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2], GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL); } |