mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
parent
71a969c30f
commit
55ad82aac0
5 changed files with 5 additions and 20 deletions
|
@ -38,9 +38,7 @@ gfx::blur::box_linear_data::box_linear_data()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
try {
|
try {
|
||||||
char* file = obs_module_file("effects/blur/box-linear.effect");
|
_effect = gs::effect::create(streamfx::data_file_path("effects/blur/box-linear.effect").u8string());
|
||||||
_effect = gs::effect::create(file);
|
|
||||||
bfree(file);
|
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,7 @@ gfx::blur::box_data::box_data()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
try {
|
try {
|
||||||
char* file = obs_module_file("effects/blur/box.effect");
|
_effect = gs::effect::create(streamfx::data_file_path("effects/blur/box.effect").u8string());
|
||||||
_effect = gs::effect::create(file);
|
|
||||||
bfree(file);
|
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
DLOG_ERROR("<gfx::blur::box> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,9 +54,7 @@ gfx::blur::dual_filtering_data::dual_filtering_data()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
try {
|
try {
|
||||||
char* file = obs_module_file("effects/blur/dual-filtering.effect");
|
_effect = gs::effect::create(streamfx::data_file_path("effects/blur/dual-filtering.effect").u8string());
|
||||||
_effect = gs::effect::create(file);
|
|
||||||
bfree(file);
|
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
DLOG_ERROR("<gfx::blur::box_linear> Failed to load _effect.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,7 @@
|
||||||
gfx::blur::gaussian_linear_data::gaussian_linear_data()
|
gfx::blur::gaussian_linear_data::gaussian_linear_data()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
|
_effect = gs::effect::create(streamfx::data_file_path("effects/blur/gaussian-linear.effect").u8string());
|
||||||
{
|
|
||||||
char* file = obs_module_file("effects/blur/gaussian-linear.effect");
|
|
||||||
_effect = gs::effect::create(file);
|
|
||||||
bfree(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Precalculate Kernels
|
// Precalculate Kernels
|
||||||
for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) {
|
for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) {
|
||||||
|
|
|
@ -44,11 +44,7 @@
|
||||||
gfx::blur::gaussian_data::gaussian_data()
|
gfx::blur::gaussian_data::gaussian_data()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
{
|
_effect = gs::effect::create(streamfx::data_file_path("effects/blur/gaussian.effect").u8string());
|
||||||
char* file = obs_module_file("effects/blur/gaussian.effect");
|
|
||||||
_effect = gs::effect::create(file);
|
|
||||||
bfree(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Precalculate Kernels
|
// Precalculate Kernels
|
||||||
for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) {
|
for (std::size_t kernel_size = 1; kernel_size <= MAX_BLUR_SIZE; kernel_size++) {
|
||||||
|
|
Loading…
Reference in a new issue