I'm writing a program with OpenTK in C# and I currently tried to get a texture on a group of cubes.
My problem is that when i use the given texture with 3 pixels in it and give the bitmap into my shader to a sampler2d it interpolates the colors of the texture while rendering instead of giving me 3 lines with the 3 colors on each side of each cube.
To give it into the shader i used the code similar to the one given on this side.
Here the exact code in my fragment shader:
#version 430 core
uniform sampler2D materialTexture;
in vec2 uvPos;
out vec4 color;
void main()
{
vec4 materialColor = texture2D(materialTexture, uvPos);
color = materialColor;
}
Here the image used as texture shown in gimp:
What would i have to do so the image would be rendered on the cubes without interpolating? Are there maybe any flags or calls in OpenTK i can set to prevent this?