It doesn’t display the incorrect material, it just doesn’t use UVs if you enter float2(1,1)
. You need to assign a proper UV (TexCoord) if you want the image to display properly.
A short explanation of what is happening in other words:
– I am the image and I ask you: “how big I should be”.
– You say: “You should be 1 and also 1 again”.
– I say, uhm alright, and interprets this as: “I will be purple because that is what I think 1, 1 is!”.
What you need to do is to say you should be UV (1,1), so I know that you are talking about Width and Height.
How to take only the red in texture in HLSL?
Red as in (1,0,0) - HEX #FF0000, or the spectrum of red seen in the image?
Yes, how to get only the red in the picture?