Search Unity

Render texture causing transparency in model

Discussion in 'Editor & General Support' started by CWatsonT2, Apr 2, 2020.

  1. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    114
    I'm rendering a camera to a render texture. I have one prefab (trump head) that is causing me issues. As you can see in the attached picture parts of the hair become see through. It doesn't happen to the prefab it only looks like this on the render texture. The other strange thing is that when I run it in the editor if I make ANY changes to the camera settings the problem goes away. I tried making camera changes via code and that didn't fix it. It only gets fixed if I manually change camera settings in the editor while running. What's going on here and how to I fix it?
     

    Attached Files:

  2. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    114
    Figured this one out. It had to do with a plugin I was using that controls the camera perspective. Turns out it's buggy if the perspective equals zero. Limited it to .2 instead and it works fine.