myso
New Member
nice to meet you.
I am currently working on a filter that stitches a dual-fisheye using Lua Script.
Help me solve this problem.
References
https://github.com/jp9000/obs-studio/blob/master/plugins/obs-filters/scroll-filter.c
https://github.com/jp9000/obs-studi.../frontend-tools/data/scripts/clock-source.lua
Error Log
Filter Create Code
I am currently working on a filter that stitches a dual-fisheye using Lua Script.
Help me solve this problem.
References
https://github.com/jp9000/obs-studio/blob/master/plugins/obs-filters/scroll-filter.c
https://github.com/jp9000/obs-studi.../frontend-tools/data/scripts/clock-source.lua
Error Log
Code:
[obs-video-filter-insta360.lua] Failed to call create for Insta360: .../obs-video-filter-insta360/obs-video-filter-insta360.lua:67: Error in gs_samplerstate_create (arg 1), expected 'struct gs_sampler_info const *' got 'table'
Filter Create Code
Code:
function Filter:create(settings, context)
local filter = {}
local effect_path = script_path() .. "crop_filter.effect"
local sampler_info = {}
sampler_info.filter = obs.GS_FILTER_LINEAR
sampler_info.address_u = obs.GS_ADDRESS_WRAP
sampler_info.address_v = obs.GS_ADDRESS_WRAP
filter.context = context
obs.obs_enter_graphics();
filter.effect = obs.gs_effect_create_from_file(effect_path, nil)
filter.sampler = obs.gs_samplerstate_create(sampler_info) -- This Line Error
obs.obs_leave_graphics();
if filter.effect then
return;
end
filter.param_add = obs.gs_effect_get_param_by_name(filter.effect, "add_val")
filter.param_mul = obs.gs_effect_get_param_by_name(filter.effect, "mul_val")
filter.param_image = obs.gs_effect_get_param_by_name(filter.effect, "image")
-- obs.obs_source_update(context, settings);
return filter
end
Last edited: