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:
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_effect_antialiasing.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_antialiasing.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
index 47a03073839..9d5ff47fc82 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
@@ -242,27 +242,13 @@ void workbench_antialiasing_engine_init(WORKBENCH_Data *vedata)
/* TODO could be shared for all viewports. */
if (txl->smaa_search_tx == NULL) {
- txl->smaa_search_tx = GPU_texture_create_nD(SEARCHTEX_WIDTH,
- SEARCHTEX_HEIGHT,
- 0,
- 2,
- searchTexBytes,
- GPU_R8,
- GPU_DATA_UNSIGNED_BYTE,
- 0,
- false,
- NULL);
-
- txl->smaa_area_tx = GPU_texture_create_nD(AREATEX_WIDTH,
- AREATEX_HEIGHT,
- 0,
- 2,
- areaTexBytes,
- GPU_RG8,
- GPU_DATA_UNSIGNED_BYTE,
- 0,
- false,
- NULL);
+ txl->smaa_search_tx = GPU_texture_create_2d(
+ SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT, GPU_R8, NULL, NULL);
+ GPU_texture_update(txl->smaa_search_tx, GPU_DATA_UNSIGNED_BYTE, searchTexBytes);
+
+ txl->smaa_area_tx = GPU_texture_create_2d(
+ AREATEX_WIDTH, AREATEX_HEIGHT, GPU_RG8, NULL, NULL);
+ GPU_texture_update(txl->smaa_area_tx, GPU_DATA_UNSIGNED_BYTE, areaTexBytes);
GPU_texture_filter_mode(txl->smaa_search_tx, true);
GPU_texture_filter_mode(txl->smaa_area_tx, true);