//match the values of the outline camera to match those of this camera void LateUpdate() { cam.fieldOfView = camera.fieldOfView; cam.orthographicSize = camera.orthographicSize; cam.cullingMask = CullingMask; OutlineAux o = (OutlineAux)Component.FindObjectOfType(typeof(OutlineAux)); o._Color = OutlineColor; o._Thickness = Thickness; }
void OnRenderImage(RenderTexture source, RenderTexture destination) { /*Graphics.Blit(source,destination,unlitMat); * * OutlineAux o = (OutlineAux)Component.FindObjectOfType(typeof(OutlineAux)); * Graphics.Blit(o.tex,destination,transMat); */ //cullingmask is reset to avoid layer issues cam.cullingMask = camera.cullingMask; OutlineAux o = (OutlineAux)Component.FindObjectOfType(typeof(OutlineAux)); //add the rendertexture from the outline component onto what ws rendered by this camer Graphics.Blit(o.tex, source, transMat); //set the destination to the source Graphics.Blit(source, destination, unlitMat); }