gl3 jxs documentation

Martin Beck's icon

I have some questions regarding xml attributes of jxs-files:
Is there a comprehensive documentation available?
I'm interested in e.g.

1) Textures

<param name="tex0" type="int" default="0" />
<param name="tex1" type="int" default="1" />

Is type doing anything? Can I pass jit.gl.texture @type float32 to the shader without the type getting casted?

2) In a default jxs the geometry shader has input_type and output_type

<program name="gp" vertices_out="4" input_type="lines_adjacency" output_type="triangle_strip" type="geometry">

Does this affect the shader behaviour somehow? This seems to be redundant to the layout qualifiers

layout (lines_adjacency) in;
layout (triangle_strip, max_vertices=4) out;

Rob Ramirez's icon

type in the JXS has nothing to do with the texture type being bound, it is simply the type of the value, which is an integer representing the texture unit the uniform should reference.

in gl3 there is no need to provided XML attributes in geometry programs, i.e. vertices_out, input_type and output_type may all be omitted from the XML tag.

mirrorboy's icon

I am a JXS student. Please excuse my additional question.

state="TEXTURE0"
state="TEXTURE1"

is it necessary? If I do, I can't get the textures to pass properly. if I delete the state, the two textures pass correctly.


Reading this document, it seems to be injected by writing state, but in fact it appeared to be injected by default number.

https://docs.cycling74.com/max8/tutorials/jitterchapter99_appendixc

Rob Ramirez's icon

there is no TEXTUREn state, simply use default integers to bind to texture units:

<param name="tex0" type="int" default="0" />
<param name="tex1" type="int" default="1" />
mirrorboy's icon

Thanks Rob.

I see so much potential in jxs and jxp and I love them.