So, when I try to inject SMAA in No Man's Sky (opengl 64 bit) I end up with a very dark image... and constant flickering/strobing. It looks like maybe the SMAA shader needs the screen image to be in a certain color format, but it isn't, so it messes up the gamma somehow? Totally guessing. Not even sure if what I said makes real world sense. I can't explain the flickering/strobing, either.
I think engine uses deferred shading/rendering, if that matters. I didn't think that it would.
All other shaders (that I tried) seem to work fine, including fxaa.
EDIT: Ahh... might be related to: reshade.me/forum/shader-troubleshooting/...king-in-no-man-s-sky
EDIT2: Ehhh... maybe not, since it happens even when smaa is the only shader injected, so it should be related to the number of samplers. Unless I'm wrong, and smaa uses a bunch of samplers.
EDIT3: It doesn't.
SMAA is one of the few shaders working in linear color space, so it converts the color data using SRGB texture views. Those aren't properly implemented in some drivers in which case the conversion does not occur and you end up with calculations in the wrong color space which yields very dark or very bright results. So either it is this, or it is the sampler issue. But while SMAA uses some, it does not use 8.
Cheers, crosire =)
The administrator has disabled public write access.
Injecting SMAA in No Man's Sky
2 years 7 months ago #3
Further testing using just the curves shader causes strobing/flickering in certain scenes in NMS, but only aboard the space stations when talking to aliens. In those situations, the engine creates black borders on the top and bottom of the screen to make it look cinematic. While that's happening, I get the same flickering/strobing as when SMAA is enabled without the darkening issue (or at least I don't notice the darkening).
But, yeah, I guess it's just the way it is. Using 16.8.2 AMD drivers, so maybe the next version will fix it.
I'm working on fixing the problems related to the SMAA shader for NMS with Radeon (R9-290x here) for the beta version of catalyst.
The issue seems to be related to the following:
Currently SMAA seems to assume it only needs to convert from Linear to SRGB when piggybacked.
It turns out however (for me) that replacing the conversion line to just after the if-statement (immediately before the return statement) the space seems correct.
The following goes for the SMAAWrap.h file
Basically edit the last few lines so it'll be like:
Edit; Forgot to mention:
I am planning to double-check the effects of this modification using my laptop (which has an nVidia-chip) to see if it's an AMD-thing, or something else.
However It's bound to wrongly convert the space in *some* cases, it works for our specific case.
Another problem I'm running into (I'll probably have to make another topic on this one. Though thought i'd tuck it in here, because It's related to SMAA for NMS)
is that I can't seem to access the depth-buffer.
Thus far, whatever I've tried, the depth-buffer is all-black as soon as the splash-screens have finished...