Search Unity

How to create the glow emanating from a video screen?

Discussion in 'Daydream' started by HeyBishop, Mar 29, 2018.

  1. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    I'd like to cast a pool of light on the ground, just like the one you see in YouTubeVR and in media-app-template-master. I am using GvrVideoPlayerTexture to play my video.

    I can't figure out how to tap into the colour (or average colour) of the video frame to feed to the a light. When digging around in the demo scenes and media-app-template-master I can't even find the light that does the illuminating.

    Any insights would be appreciated!
     
  2. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    If you have read access to video frame buffer: do a sparse sampling of the pixel colors, average the RGB components into floats (sample like a grid of 200 pixels ditributed accross frame), make new AVG color, Have another color lerp to that AVG color, apply lerped color to unity point light "Light" object.