For some reason, I cannot get a simple texture onto a Quad, I even tried asking LLMs and they keep going in circle on issues like mipmaps and other stuff which probably isn't causing this.
A normal Quad in graphics is made up of 2 triangles and the UV should give us a smooth gradient from left to right, however in my case it is giving me a diagonal line where the triangles meet.
Just the UVs, this is wrong it shouldn't be like this:

My material is quite simple:
material {
name : "TexturedColorMaterial",
shadingModel : unlit,
flipUV : false,
parameters : [
{
type : sampler2d,
name : albedoMap
}
],
requires : [
uv0
]
}
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = texture(materialParams_albedoMap, getUV0());
}
}
The full code is here, the only thing different is i am using GLFW for my example
https://gist.github.com/RoastedKaju/c94a8600aef8053ecdc717f1fc6649ee
For some reason, I cannot get a simple texture onto a Quad, I even tried asking LLMs and they keep going in circle on issues like mipmaps and other stuff which probably isn't causing this.
A normal Quad in graphics is made up of 2 triangles and the UV should give us a smooth gradient from left to right, however in my case it is giving me a diagonal line where the triangles meet.
Just the UVs, this is wrong it shouldn't be like this:

My material is quite simple:
The full code is here, the only thing different is i am using GLFW for my example
https://gist.github.com/RoastedKaju/c94a8600aef8053ecdc717f1fc6649ee