Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Apply shader effect to webcamTexture

Discussion in 'Shaders' started by eco_bach, Nov 28, 2015.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    I am trying to apply a pixelate shader effect to a webcamTexture and then obtain the brightness values of each pixelated 'cell' in realtime. That is my goal!

    So far have sourced this pixelate shader effect here>
    http://forum.unity3d.com/threads/18...ffect-shader?p=1252552&viewfull=1#post1252552

    It works by applying it to a quad that sits between your camera and the actual webcamTexture(on another quad).

    Can any shader experts tell me if I could simplify things by attaching this shader directly to the camera via a script and accessing via OnRenderImage() ?
     
  2. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,970
    You could use a UI Panel with a RawImage and a custom material with your pixelate shader. Desist from using OnRenderImage. It's not an efficient solution for this.