Search Unity

Can I use Unity to add a filter to the OS?

Discussion in 'Getting Started' started by JensBoos, Jan 21, 2020.

  1. JensBoos

    JensBoos

    Joined:
    Jan 21, 2020
    Posts:
    2
    I found Unity because of this amazing CRT filter here: https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/ultimate-crt-80048

    I am now wondering the following: can one, in principle, use Unity to apply that filter to the current screen? I.e. can one create a Unity application that runs in the background that applies this filter to the desktop and all the windows that are opened? I want to make my Windows 10 experience feel more retro.

    Sorry if this a dumb question, I appreciate any pointers :)

    Jens
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Hmm, no, I don't think Unity can do that.

    If you're into retro though, you might enjoy Mini Micro. Though it doesn't go so far as to simulate CRT defects like this plugin does. Hmm... maybe that should be an option?
     
  3. JensBoos

    JensBoos

    Joined:
    Jan 21, 2020
    Posts:
    2
    Thanks for your advice, I see. That's a bit unfortunate since I am really after this retro look. I will keep searching :)
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Easiest way to implement this would be to take an existing application intended to have a similar effect (like a custom blue light filter application) and modify it to look the way you want.

    https://github.com/datbnh/ScreenDimmer

    Windows natively supports transparent windows and passing events to controls below them but the window has to have its window style set to WS_EX_LAYERED and WS_EX_TRANSPARENT to enable it.

    https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

    Below is an example of using the Win32 API to access and modify the extended style of a Unity application window. Just be aware according to the author you will need to make builds to test out the effect as it will affect the editor too while in play mode.

    https://forum.unity.com/threads/sol...dow-with-opaque-contents-lwa_colorkey.323057/
     
    Last edited: Jan 22, 2020
    Joe-Censored and JoeStrout like this.