cancel
Showing results for 
Search instead for 
Did you mean: 

Banding in low-light scenes

tbkuno
Explorer
Hi,

I'm experimenting with some low-light situations and I'm getting terrible banding:

m7nq3hooi2bv.png

There is this article for improving banding issues, but I'm failing to implement the solution:


I wrote a script and tried both lines in the start function:

OVRManager.eyeTextureFormat = OVRManager.EyeTextureFormat.R16G16B16A16_FP;
OVRManager.eyeTextureFormat = OVRManager.EyeTextureFormat.R11G11B10_FP;

My project is also in linear space, but unfortunately the script doesn't affect the banding.

Am I doing this right or have I missed something?








10 REPLIES 10

PAalto
Expert Protege
I hade the same issue, I fixed my banding problems by implementing dithering in my shaders based on this tech note: https://developer.oculus.com/blog/tech-note-shader-snippets-for-efficient-2d-dithering/

tbkuno
Explorer

PAalto said:

I hade the same issue, I fixed my banding problems by implementing dithering in my shaders based on this tech note: https://developer.oculus.com/blog/tech-note-shader-snippets-for-efficient-2d-dithering/


Hi, thanks for your reply!

Does the method described in the link that I posted (https://developer.oculus.com/blog/tech-note-removing-dark-scene-color-banding-in-unity-/) does not work at all?

I'm not very experienced with shaders, it could take a while for me to implement the dithering to the shaders, that's why I would like to know if I'm doing something wrong or it just doesn't work.

PAalto
Expert Protege
I am not familiar with that method, and I am developing for mobile, which does not support that method, sorry.

tbkuno
Explorer

PAalto said:

I am not familiar with that method, and I am developing for mobile, which does not support that method, sorry.


Thanks, hopefully somebody can explain why it doesn't work.

tbkuno
Explorer
I could solve this issue by using Unity's Post-Processing Pack v.1 (directly from the unity asset store) by applying "Dithering" and "Antialising". The question remains though, why the article's suggested solution didn't work.

bkj
Adventurer
@tbkuno not supported texture format

nat42
Explorer
is there no way to call glEnable(GL_DITHER) on the OpenGL ES context, to get dithering done for you? (I know it's frequently disabled as it has a cost, but I imagine it's as fast as or fast than options discussed here like writing your own dither code)

bkj
Adventurer
@nat42 lol no

nat42
Explorer
Seems like at a minimum you could put it in native/java code and call it from the the main Unity thread, providing you aren't using multithreaded rendering (some genius might be able to make it work with multithreaded rendering as well... but without seems easier and like if you Google peple have had some sucess in the past with hacky hacks)