What node is this? Texel Size

I’m trying to follow some tutorial but I cannot identify the “Texel Size” node. One answer was that it is texture size and then it has a dropdown. I found a Texture Property node that can be changed to texel size, but it has incompatible input with the output of SceneTexelSize.

Output float is incompatible with texture.

So the Texture Property node is for an actual texture, but I think we want to get the scenes texel size, as this is post process.

image

Not really sure.
Whats the end goal of it in the tutorial?

At a base level its likely just a straight up scalar.
You may be able to just replace it with one and play with the value of it.

However it could be a float2, if its like a UV node for instance.

Share a link to the tutorail, maybe it sparks ideas.

Here is the tutorial:

I confirmed with the author that it was the TextureProperty node, and then you select TexelSize from dropdown.

What confused me was that you need to convert from a vector4 to 3, which at the time I didn’t know how to do, so was getting errors that I didn’t know how to solve. But all that is necessary is to mask RGB (component mask node).

Also one thing hemming me up is that if you make a lerp node and plug in a vector4, it assumes that type for the node. So if you plug in something, change your mind in plug in something else, the type for the lerp node will still remain and give you errors. (for those familiar with blueprint, same thing sometimes happens with array related nodes, for instance, except there you usually have some colors which make it easy to see) Just confusing stuff for beginner with material graph.

3 Likes

In a lerp, so long as both inouts are the same a recompile is all that used to be needed to get it to take on the new type.
If thats not the case currently it may be a regression…

Pretty decent tutorial btw.

1 Like

Hey can you explain how you explain how you got past this point?

I am also stuck at this point.

Literally “mask RGB”
Type mask, pick it. Click it. Select the output channels you want.

@TheXplanations1
What he said ^

but here’s some pics too:
image
image

That makes it so you can filter just specific channels. So if you took the RGB from an RGBA, that is conversion from 4 to 3.

Even after reading every comment here and on youtube, this still make no sence to me, even after using the mask rgb the “texel size” from “texture property” still ask for a texture (“[SM6] (Node TextureProperty) Texture Sample> Missing input texture”).

The second node is just a named reroute :slight_smile:

1 Like

Was googling and came across this thread. For anyone else wondering, looking at the code it’s the same as the ViewProperty node set to ViewSize - in a post-process material it’s pretty much the resolution that’s being rendered.

Code can be found at line 11030 - Engine/Source/Runtime/Engine/Private/Materials/MaterialExpressions.cpp

The ViewProperty node is in the same file at line 10882
More code to the ViewProperty node at line 4973 -Engine/Source/Runtime/Engine/Private/Materials/HLSLMaterialTranslater.cpp

You can get the names of the variables that also get used in the actual shader files.

1 Like