title: Unity WebCamTexture video lags in lowlight conditions
body: <p>I have made a simple video streaming application in unity.I use the device Webcam through unity's WebCamTexture class. I have a RawImage in my canvas on which i render the WebCam live feed as follows:</p>
  
  <pre><code>public RawImage image;                 
  private WebCamTexture liveRec;
  
  
  void Start () {
  
      WebCamDevice[] camDevices = WebCamTexture.devices;
      liveRec = new WebCamTexture(camDevices[camDevices.Length - 1].name);
      liveRec.requestedHeight = 1;                
      liveRec.requestedWidth = 1;              // lowest quality
      liveRec.filterMode = FilterMode.Trilinear;
      liveRec.Play();
      image.texture = liveRec;
  
                }
  </code></pre>
  
  <p>Everything is working perfectly, the video runs smooth, but only in good lighting conditions.When my room becomes dark(low lighting conditions) the video becomes very laggy(seems to be around 25fps).I thought it is a problem in my application, but when i accessed the WebCam through the Windows control panel, there it was also lagging but then i saw an option there "ExposureCompensation" i don't know what it is but when i lowered it the video became darker but smooth again(see image)<a href="https://i.stack.imgur.com/jvXmH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jvXmH.jpg" alt="enter image description here"></a>.Now what can i do about this in my application, how to access and lower this parameter(C#).</p>
  
  <p>THINGS I HAVE TRIED:</p>
  
  <blockquote>
    <blockquote>
      <p>I have used about every shader on my rawimage although some seem to darken the texture but the lag persists</p>
      
      <p>I have used NatCam but it doesn't provide full functionality in windows(Falls back to unity's implementation "Webcamtexture")</p>
      
      <p>Have read other questions that use DirectShow api which seems to be incredibly difficult to me, and have no idea whether it will work with unity or not</p>
    </blockquote>
  </blockquote>
  
  <p>Please help me i will be much obliged! (and treat me as a student not as a professional)</p>
  
  <p>EDIT:  This is not a WebCam Specific problem, i have tested the same application on 2 laptops with their own integrated cameras, the lag persists in low lighting conditions.</p>