As the title says, I’d like to change UI elements color value based on the pixel color value behind it.
The crosshair as an example would be white, while looking at anything black & black while looking at anything white. Kind off like the difference color invert function in photo editing.
If anyone knows a solution to this I’d be very thankfull for sharing it.
While I’m not sure exactly how to do it, do remember that you can use materials in the image slot: (ignore the error message- I was just putting a random material as example)
So I’ve found a way which’s base principle works, but sadly isn’t flexible enough for my use case.
As I come to believe, previous versions of UEs cameras had a render capture to texture function. Now, I had to add a SceneCaptureComponent to my BP and mimic the actual cameras settings, location, etc. Problem with that is that some of the variable settings nodes seem not to work with this kind of component (set FOV for example).
Capture Scene:
The render target textures resolution would have to adapt to the screen resolution though, so that the Widged BPs canvas pixels align with the RT textures.
Lastly Add the RT texture to the UI Material.
Used @rokenrock node setup. Material domain is UserInterface, blend mode Translucent.
Sadly said, the mentioned problem makes its use irrelevant to me which means I won’t be digging further. Thx though @rokenrock.