Im using a texture as data of floats, and wish to sample its values with no interpolation, but according to the nearest.
In the follow graph, I created a samplerstate object and used it, but it yields gray over all output. How should I fix it?
As a check, I made the “nearest” manually by modifying the UV coordinates.
Note: For this example I used an image of 2x3, contains one channel of floats values.
I created a tiff image of floats using python as follows and add it into UE content :
import os
import numpy as np
import tifffile as tiff
# create image of float values (range of 0.0 up to 1.0)
# NOTE: dtype must be np.float32
a = np.array([[0.1, 0.2],
[0.3, 0.4],
[0.5, 0.6]], dtype=np.float32)
tiff.imwrite(os.path.dirname(__file__) + "\\test.tif", a)

