Download

Difference between Differences between texture sample and texture object?

What is the difference between Differences between texture sample and texture object?
I am crating a new material function one that will allow be to edit things easier and so I can learn what I am doing, but one question still came up. I tried to search for it but couldn’t find anything one input uses a texture sample and one uses a texture objet. again what’s the difference?

**texture object: **
The TextureObject expression is used to provide a default texture for a texture function input within a function. This node does not actually sample the texture, so it must be used in conjunction with a TextureSample node.

texture sample:
The TextureSample expression outputs the color value(s) from a texture. This texture can be a regular Texture2D (including normal maps), a cubemap, or a movie texture.

Here you can get more information: Texture Expressions | Unreal Engine Documentation :slight_smile:

So what it is saying is the Texture object can not supply and RGB channels or the alpha channel, just a flat texture nothing more.
Thanks

Sometimes you may want to sample the texture in material function instead taking directly sampled textures like vector3.
It might be the only way for solution. And then you have to use texture object and sample it with desired coordinate.

Cool I have crated a very simple distance blend to see what texture factions do, I only started it because I found I wanted to change textures quicker when I was playing around with new Rock Textures, I was using the “detailedTexture” supplied buy epic, but to try to stream line it in my martial instance.



I think I will find away to change them to texture samples.

If I understand you correctly, you can create it very easy with pixeldepth node.
https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Depth/index.html#pixeldepth

More like a reference. But you can get alpha btw. if you wanna sample the texture through a custom function.