I’m not sure if I am missing something but I cannot get my 3d widgets in world space to use the nearest neighbor filtering rule.
I have tried setting the render target’s filtering to “Nearest” using blueprints but this seems to have no effect on the rendering at all. I have all AA turned off. (It’s a pixel art game so AA isn’t really needed)
The widget looks perfectly crisp int he umg editor but once in world it looks filtered.
Such a fun problem that I encountered myself.
I found a stupid solution.
In a Blueprint add a widget component (which is the 3D widget) and drag the reference in the Blueprint. On the “Begin Play” event use a Delay with 0.0 seconds. Feed that into a “Is Valid” node (the one in the utilities section with the question mark as a symbol). From the Widget component reference drag out a “Get Render Target” node and feed its output into the “Input Object” socket of the “Is Valid” node. The “Is Not Valid” output goes back into the Delay. The “Is Valid” execution goes into a “Set” node for the “Texture Group” of the Render Target. To get that node, drag out from the “Get Render Target” node and search for set texture group (context sensitive search should be activated by default).
For some reason the Render Target will ignore the change of the Texture Group after the first frame of existence and I didn’t find any update/refresh node that would have any impact.
ok, novacrazy on reddit prvided a shader based solution, that works way better.
create a “custom” node and paste this HLSL code into to Code line in the details panel
Set the Output Type to “CMOT Float 4” (this are the channels RGBA)
name the Input Name for the first Input to
and add another input with the small + sign and call that input
a TextureObjectParameter node and call it “SlateUI”
a TextureProperty node and set it to TextureSize
a TextureCoordinate node
a Multiply node
2 ComponentMask nodes and for the first set the checkboxe to true for R,G,B and the second one for A only
TextureObjectParameter to the TextureObject input of the custom node and to the TextureProperty node
TextureProperty and TextureCoordinate to the Multiply node
Multiply node to the PixelIndex input of the custom node
Custom node to both ComponentMask nodes (these are you final outputs RGB and Alpha)
here is the documentation on the “Load” command in the HLSL code