Incorrect texture samplers count

It looks like the material editor is incorrectly counting the number of texture samplers when duplicating texture sampler nodes.

I often duplicate the same texture sampler just to keep a clean looking material network. In UE3 the material editor would properly account for duplicates in the total number of texture samplers being used. It appears that UE4 is not using this behavior. Is this a bug, has UE4 changed the way materials are compiled, or am I doing something silly?

Hi ,

Texture duplicates act as instances of the same texture and do not count towards your total texture samples because you are not using multiple textures, merely copies of the first. The system recognizes this and does not use extra space when calculating them. If it is counting towards your total number of textures it is certainly a bug as that is not intended behavior, but if you are adding duplicates and it is not counting towards your total number of texture samples then this is expected behavior. Thank you and have a great day!

Hi ,

I looked into it some more to find a repro case. It looks like my confusion stems from the fact that UE4 reports the texture samplers used for lighting by default now. So an empty material in UE4 uses 3/16 texture samplers, where an empty material in UE3 would use something like 0/15.

So no bug, but maybe a suggestion of separating the number of texture samplers used directly in the material vs. lightmaps in the material editor?

Thanks, and sorry for the incorrect bug report.

Hi ,

Thank you for the feedback, we will take this into consideration. Have a great day!