Exemplo n.º 1
0
 protected virtual void CreateDepthRenderTexture()
 {
     if (m_depthRenderTex != null)
     {
         m_depthRenderTex.Release();
         Helper.DestroyImmediate <RenderTexture>(ref m_depthRenderTex);
     }
     m_depthRenderTex            = DM_OffScreenRenderer.createRenderTexture(DM_OffScreenRenderer.getUniqueTextureName(), (Int32)(m_parentCamera.pixelWidth * 0.5f), (Int32)(m_parentCamera.pixelHeight * 0.5f), 0, RenderTextureFormat.ARGB32);
     m_depthRenderTex.filterMode = FilterMode.Point;
     m_depthRenderTex.anisoLevel = 0;
     m_depthRenderTex.Create();
 }
Exemplo n.º 2
0
 protected virtual void CreateDiffuseRenderTexture()
 {
     if (m_diffuseRenderTex != null)
     {
         m_diffuseRenderTex.Release();
         Helper.DestroyImmediate <RenderTexture>(ref m_diffuseRenderTex);
     }
     m_diffuseRenderTex            = DM_OffScreenRenderer.createRenderTexture(DM_OffScreenRenderer.getUniqueTextureName(), (Int32)(m_parentCamera.pixelWidth * 0.5f), (Int32)(m_parentCamera.pixelHeight * 0.5f), 0, RenderTextureFormat.ARGB32);
     m_diffuseRenderTex.filterMode = FilterMode.Trilinear;
     m_diffuseRenderTex.anisoLevel = 1;
     m_diffuseRenderTex.Create();
     m_redrawCamera.targetTexture = m_diffuseRenderTex;
 }