Changeset View
Changeset View
Standalone View
Standalone View
source/blender/shader_fx/intern/FX_shader_blur.c
| Show All 17 Lines | |||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup shader_fx | * \ingroup shader_fx | ||||
| */ | */ | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include "BLI_math.h" | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "FX_shader_types.h" | #include "FX_shader_types.h" | ||||
| static void initData(ShaderFxData *fx) | static void initData(ShaderFxData *fx) | ||||
| { | { | ||||
| BlurShaderFxData *gpfx = (BlurShaderFxData *)fx; | BlurShaderFxData *gpfx = (BlurShaderFxData *)fx; | ||||
| ARRAY_SET_ITEMS(gpfx->radius, 1, 1); | copy_v2_fl(gpfx->radius, 50.0f); | ||||
| gpfx->samples = 4; | gpfx->samples = 8; | ||||
| gpfx->coc = 0.025f; | gpfx->rotation = 0.0f; | ||||
| } | } | ||||
| static void copyData(const ShaderFxData *md, ShaderFxData *target) | static void copyData(const ShaderFxData *md, ShaderFxData *target) | ||||
| { | { | ||||
| BKE_shaderfx_copyData_generic(md, target); | BKE_shaderfx_copyData_generic(md, target); | ||||
| } | } | ||||
| ShaderFxTypeInfo shaderfx_Type_Blur = { | ShaderFxTypeInfo shaderfx_Type_Blur = { | ||||
| /* name */ "Blur", | /* name */ "Blur", | ||||
| /* structName */ "BlurShaderFxData", | /* structName */ "BlurShaderFxData", | ||||
| /* structSize */ sizeof(BlurShaderFxData), | /* structSize */ sizeof(BlurShaderFxData), | ||||
| /* type */ eShaderFxType_GpencilType, | /* type */ eShaderFxType_GpencilType, | ||||
| /* flags */ eShaderFxTypeFlag_Single, | /* flags */ 0, | ||||
| /* copyData */ copyData, | /* copyData */ copyData, | ||||
| /* initData */ initData, | /* initData */ initData, | ||||
| /* freeData */ NULL, | /* freeData */ NULL, | ||||
| /* isDisabled */ NULL, | /* isDisabled */ NULL, | ||||
| /* updateDepsgraph */ NULL, | /* updateDepsgraph */ NULL, | ||||
| /* dependsOnTime */ NULL, | /* dependsOnTime */ NULL, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ NULL, | /* foreachIDLink */ NULL, | ||||
| }; | }; | ||||