Can Tex2dGrad and SampleGrad be exposed for use in Blueprint?

Hello!

I’m trying to build a material that in UE3 (Dx9) would make use of Tex2dGrad within a custom node. I understand the UE4 (Dx11) equivalent is SampleGrad.

The problems I’m encountering are:

  1. tex2Dgrad doesn’t compile, it throws the 'tex2Dgrad does not take 4 parameters, possible intrinsic funcions are: tex2Dgrad(sampler2D, float2, float2, float2) error despite valid input parameters.

  2. SampleGrad requires me to pass in a sampler state, which whilst I can choose this in the texture sampler, I can’t pass it across to the custom node.

We really need to be able to either atlas or array textures and have them respect their mip-maps, but there genuinely seems to be no way to do this in UE4, despite having been possible in UDK?

I created a bug for that (TTP 327033 UE4: RENDRING: Expose Texture2dGrad to material expressions). We always intended to expose it but we rarely had the need. Tex2DGrad is quite slower on a lot of hardware than Tex2DLod (we have exposed). Often it’s better to change the solution to use Tex2DLod
You might be able to work around this missing feature using the custom node but you would have to do that by yourself.

Does not seem to function properly thus far. bumping.

Hi Tepcio, As this is a post for archival purposes and is from our beta build of UE4, please post this in the AnswerHub as a new question. Thank you.

As an update, this feature has yet to be implemented, but has been prioritized and assigned.

Cheers!