Unable to sample custom texture inside custom expression
I am unable to sample textures inside a "Custom" node. I get an error saying cannot implicitly convert 'Texture2D' to 'sampler2D'. I have attached a screenshot of my setup below.
My custom expression code:
Unfortunately, You can't sample a texture from within a custom expression. This is a known limitation that we currently do not support. But, I have raised awareness about this issue and expect it to be fixed in a future release.
answered Jun 02 '14 at 07:38 PM
I found a temporary solution as explained here : https://forums.unrealengine.com/showthread.php?405-HLSL-code-Texture2D-to-sampler2D
when analysing hlsl code, It seems that the CustomTexture node generate a Texture2D, but Custom node wait a sampler2D as argument function...
I would request a fix for custom node (and/or custom texture) and a real window to edit code instead of a single line text box.
answered Jun 05 '14 at 09:09 PM
It is officially supported since about 4.7:
(if your texture pin is named Tex)
However it did not work for me, I had to use this:
answered May 03 '18 at 09:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here