jit.gl.pix codebox lua_docall error in Max 6.1/6.1.2 but not in Max 6.0.8

LLT's icon

Hello everyone, in the max version 6.1/6.1.2(32 or 64 bits) when I replace dot with neg line 15 of the codebox I have an error message :

lua_docall error: [string "gen2.jit.Types"]:241: attempt to index local 'sigty' (a nil value)
stack traceback:
    [string "gen2.jit.Types"]:241: in function
    (tail call): ?
    (tail call): ?
    [string "gen2.jit.Model"]:561: in function 'cast_expression_inputs'
    [string "gen2.jit.Model"]:605: in function 'Expression'
    [string "gen2.jit.Model"]:616: in function 'f'
    [string "gen2.Module"]:841: in function 'flow_iterate'
    [string "gen2.Module"]:839: in function 'flow_iterate'
    [stri

while it works well in the Max Version 6.0.8

Reproduced this error in different version of system I use
Mac os lion, mountain lion ant Windows 7 64 bits

Mac mini 2.4 Ghz Core 2 Duo - 8 Go - Chipset GeForce 320M.

Someone has the same problem?

Max Patch
Copy patch and select New From Clipboard in Max.

Merci.
LLT

LLT's icon

Hello, no one is on the spot?
LLT

Wesley Smith's icon

Hi there. Back from vacation and on the spot :)
The problem is this chunk of code:

offset = vec(neg(dx, wnorm), neg(dy, wnorm))

You're using the neg function, which is unary, but giving it 2 arguments. The bug is that we're not properly checking the # of inputs and discarding the second one. If you fix this, your code will work.

LLT's icon

Hello Wesley, good return on the spot.
Thank you for your reply.
My determination to compare Max 6.0.8 and 6.1, has blinded me ;)
Everything works fine now.

Another thing, while you're on the spot :)
Do you have a track to create this http://dmesh.thedofl.com with jit.gl.pix.
Thank you again.
Laurent

Wesley Smith's icon

This project uses Delaunay Triangulation, which is not something jit.gl.pix is going to be able to do. There are GPU implementations of DT, but they're beyond the scope of jit.gl.pix's capabilities.

LLT's icon

Ok I understand, I need to create a shader for the DT.