Hello,
I’m trying to make custom Shader material for mesh with a texture. And I’m taking Material Shaders as reference. What I figured out for now:
- I have to use “Set material Image param” node to push the texture to the shader.
- I have to input in that node Image field a relative path to my “Bundled” folder. As I have the texture right in that folder, for me it’s “/uvtemplate.jpg”.
- In JSON that describes the Material with custom Shader, I have to add os it’s picked up by uniform provider:
"texture_units": [
{
"link": "pico",
"name": "pico"
}
],
- Then in fragment Shader I get then texture by “uniform sampler2D pico;” And it works.
The missing puzzle piece is and I don’t understand how to get uv coords, to use like: “fragColor = texture(pico, texCoord);”.