Hi,
My problem is my texture is not showing up when I send it to a shader it just colors my object with black.
When I am drawing I send the texture and the samplerState like this:
gd.SamplerStates[0] = samplerState;
gd.Textures[0] = t;
And this is how I am using them in the shader:
Texture2D Texture : register(t0);
SamplerState MySampler : register(s0);
float4 MainPS(VertexShaderOutput input) : COLOR
{
float4 textureColor = Texture.Sample(MySampler, input.Texture);
textureColor.a = 1;
return textureColor;
}
But my object is just black doing this.
However when I send the texture via the effect parameters and use a Sampler2d in the shader and the tex2D function the texture shows up but I can’t edit any of the filters which is what I want to do.
I have looked everywhere and I saw a post from 2017 about this and it was said to be a “bug”, and if it is I am confused why until now it hasn’t been fixed…
The method I am using above is the workaround they mentiond and it just doesn’t work.