About Me

Not Specified
Not Specified


Recent Forum Posts

Getting the camera to screen matrix Feb. 9, 2019, 11:23 a.m.

This has come up again recently, so just a note that getProjectionMatrix() returns a different but still valid perspective matrix. It just uses different conventions than usual unit cube centered at the origin. This may explain the strange point positions in the post above.

VOP structs functions Nov. 22, 2018, 10:09 a.m.

Whatever you put in “definitionCode” should show up in the code generated by the VOP Network. Perhaps no Struct VOP is part of the generated code? Ie, the output of a Struct VOP should eventually lead to an exported output variable from the shader.

When the VOP type definition (in .json file) does not have a “definitionCode”, the Struct VOP generates a VEX struct definition automatically, based on the data members in the VOP struct type. But if there is a “definitionCode”, the Struct VOP just uses that string verbatim, in the outer code section (ie before the main shader function) of the generated VEX code for the VOP network.

So if “definitionCode” is “FOO”, then “FOO” should show up in there.

And if “definitionCode” is “struct FOO { float foo; float get() {return foo;}};”, then that full definition should show up in the generated code too.

Usually, however, users define the VEX “struct FOO” in some .h file, and then “definitionCode” just has “#include foo.h”. The advantage is that other .vfl and .h source files can also include that header and reuse the VEX struct definition.

VOP HDA Dynamic output ports Nov. 20, 2018, 5:01 p.m.

You're welcome! Just want to add that it is possible to write a VOP like that, but you will need to use C++ and HDK. HDAs don't have any mechanism to specify the dynamic conditions. Also there are some issues to handle, eg, when an output disappears but it was connected, etc.