I'm trying inside a loop accessing a texture color using arbitrary coodinates.
My texture can map properly to a mesh but I can't seem to sample them without using the mesh uv coodinate.
while (count <= size)
{
int x = (int)(count % w);
int y = (int)(count / w);
float2 uv = float2(x, y);
float3 = col.Sample(texturesampler, uv).rgb;
count++;
}
the color output is always wrong. like its only sampling one color
this is my sampler description
SamplerStateDescription
{
AddressU = TextureAddressMode.Clamp,
AddressV = TextureAddressMode.Clamp,
AddressW = TextureAddressMode.Clamp,
BorderColor = new Color4(0, 0, 0, 0),
ComparisonFunction = Comparison.Never,
Filter = Filter.MinLinearMagMipPoint,
MaximumLod = float.MaxValue,
MinimumLod = 0,
MipLodBias = 0.0f
}
so I'm wondering if there it can be done or if I have to use something like sampleGrad.