
local lib_dir = gh_utils.get_scripting_libs_dir() 		
local framework_dir = lib_dir .. "lua/framework_v1/"
dofile(framework_dir .. "kx.lua")
dofile(lib_dir .. "lua/imgui.lua")    


kx_init_begin(framework_dir)

kx_set_demo_caption("Shadertoy demo")






winW, winH = gh_window.getsize(0)
g_quad = gh_mesh.create_quad(winW, winH)


--camera_ortho = kx_get_ortho_camera()
g_camera_ortho = gh_camera.create_ortho(-winW/2, winW/2, -winH/2, winH/2, 1.0, 100.0)
gh_camera.set_viewport(g_camera_ortho, 0, 0, winW, winH)
gh_camera.set_position(g_camera_ortho, 0, 0, 10)


shadertoy_prog = gh_node.getid("shadertoy_prog")

frame_counter = 0

display_imgui_params = false

kx_init_end()

