Mesh component property for setting textures is wrong
The doc (https://defold.com/manuals/mesh/#mesh-properties) says the texture property is called "tex0", but it should be "texture0" ... "texture7".
Hi, I think the doc is kind of correct but should be improved, I struggled a lot to understand what comes from where for mesh component. As I understand it:
- the "tex0" properties name depends on the material definition. "tex0" is the name of a texture sampler defined in the chosen material. If you change this name or add other samplers, these will show up right here:
- then "tex0" or "myimage" can be used in the fragment shader as sampler2D:
uniform mediump sampler2D tex0;
uniform mediump sampler2D myimage;
Talking about shaders, the different stream that can be used and appear in "position stream" are defined by the .buffer file:
Theses must be "forwarded" to the fragment shader by passing out variables (like "var_texcoord0" here, that forward the texcoord0 from vertex shader to fragment shader (it the UV stream to be used with the tex0 sampler2D) )
I think all of these information should be in the mesh component page, just to be able to "connect the dots"