Error [SM5] (Node TextureSample) TextureSample> Sampler type is Color, should be Line

Hey folks,

Every now and then, I’m using gametextures textures… I get that error.

Error [SM5] (Node TextureSample) TextureSample> Sampler type is Color, should be Linear Color for Location

Sometimes on the albedo, sometimes on the gloss map.

Any clues what is that about? Sometimes it disappears, but sometimes stays

additionally to add… sometimes this get fixed by disconnecting the node and waiting the texture to refresh inside the master material, but after time it glitches again eventually :confused:

1 Like

Change your sampler type to the appropriate one
When you importing texture you could enable and disable sRGB(Linear Color) or change compression type. Later when you use this texture in material you have to use appropriate sampler type

1 Like

Thanks for the reply! What do you suggest me gloss map to be set on?

BUT, if it doesn’t work like for me (when you import your normal map, UE doesn’t recognize it as a normal map) you also have to double click on your map and in the detail toggle you have compression–>compression settings you have to change into Normalmap (DXT…) to make the error disappear.

Hope it’ll help people who had still the same problem after changing the sampler type in the material.

2 Likes

Thanks…solved my issue

Thanks Rajuk…

I think the easiest solution for this is, double click on your Normal Texture in the content browser and uncheck “sRGB” checkbox.

1 Like

YES!!!Thankyou!I found that the check box of the color map sRGB of my parent shader was not checked. After checking it, everything was normal. It is strange that the same project file was checked on other computers.

Yes but my question is: WHY FORCE users to choose sampler? Shouldn’t there be an automatic-select option? This is causing unnecessary problems to working pipeline.
The same problem to Virtual texture sampler, I have to rewrite all my materials just because I need to use 8k virtrual textures.
THE TEXTURE SAMPLER NEED TO BE UNIFIED!!!

5 Likes

Yes unified automatic sampler type is needed.
It’s even more messy and confusing when using layer materials. I had a multi layers material working correctly, when I decided to save my custom layers as instances to be able to reuse them in different materials, the wrong sampler type error started to pop up while settings were exactly the sames in my instances…

I had this issue when I was trying to use a TextureSample as a mask. I figured out I had imported a texture file without a transparency layer. I converted it to a png with transparancy and reimported it and the problem went away.

so I just ran into something like this but not quite the same thing. for me I’m trying to use one of the ORDp texture files from mega scans. specifically I’m making a master material and needed to be able to feed the textures into the layers that I’m making. the ORDp file was sending an error from each layer but I couldn’t figure it out. what ended up solving it was that I had to change the sample type in the texture sample parameter to use masks not color for that type of file to work properly. took a fair bit of hair loss to get it solved but I think I have it now, no errors coming up any more.

just incase anyone else us having that issue as well.