3 beginner question on shader

flecheria's icon

hi, I have 3 question about shader:
1 - i don't find ftrasform() in the GLSL reference (http://www.opengl.org/sdk/docs/manglsl/) it's a built-in function of MAX? in this case there's a reference or documentation somewhere?
2 - what it means the "entry" attributi of the tag in the jxs file? (example @ mat.phong.cg.jxs)
3 - I notice that MAX don't use GLSL in/out type why?
Thanks
Paolo

Rob Ramirez's icon

part of your problem is looking at documentation for the wrong version of glsl.
Max uses glsl 1.2, so that's what you need to be looking at.
http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf
http://www.lighthouse3d.com/tutorials/glsl-tutorial/

1- ftransform() simply transforms the vertex identical to how the fixed-function pipeline would tranform it.

2 - this is a CG file, and therefore the entry-point needs to be defined. simply the name of the function to use as main.

3 - glsl version 1.2

flecheria's icon

Thanks Rob, sorry for the delay.
Point 2 isn't very clear for me right now, but I trust you!
Where can I find a complete reference of the jxs file with all available tags?
Thanks
P

Rob Ramirez's icon

check out "Appendix C: The JXS File Format" found in the jitter tutorials section of the ref-docs.
if anything is unclear, ask back here.