function init()
    
    if not shadersEnabled then return end
    
    initLuaShader('noiseShader')

    makeLuaSprite('noiseObj')
    addLuaSprite('noiseObj')

    setProperty('noiseObj.active',false)
    setProperty('noiseObj.visible',false)

    setSpriteShader('noiseObj','noiseShader')
    setShaderIntensity(0)

    runHaxeCode([[
        import openfl.filters.ShaderFilter;

        var filter = new ShaderFilter(getVar('noiseObj').shader);
    
        game.camGame.filters = [filter];
        
    ]])
end


local timePassed = 0
function onUpdate(elapsed)
    if not shadersEnabled then return end

    setShaderFloat('noiseObj','iTime',timePassed)

    timePassed = timePassed + elapsed
end

function setShaderIntensity(newVal)
    setShaderFloat('noiseObj','u_ratio',newVal)
end
