~npisanti/scriptools

ref: 27cef66988828f7eca5ea0531f8dd7f85bab8129 scriptools/shader/main.lua -rw-r--r-- 616 bytes
27cef669Nicola Pisanti glsl with mult option 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "strict"

----------------------------------------------------
window.title( " " )

if args.count() > 0 then 
    frag.load( args.get(0), "glsl" ) 
end    

local w = 480 
local h = 480

if args.count() > 2 then
	w = tonumber( args.get(1) )
	h = tonumber( args.get(2) )
end

if args.count() > 3 then
	local m = tonumber( args.get(3) )
	window.size( w*m, h*m )
	layer.create( "def", w, h, m )
else
	window.size( w, h )
	layer.create( "def" )
end

----------------------------------------------------
function loop()
    layer.open()
        rl.clear(0,0,0,0)
    layer.close() 

    frag.apply( "glsl" )
end