浏览代码

Update for CubemapArray API changes

/main
Aras Pranckevicius 8 年前
当前提交
b226d5cd
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 8
      Assets/ScriptableRenderLoop/common/TextureCache.cs
  2. 8
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

8
Assets/ScriptableRenderLoop/common/TextureCache.cs


return cache;
}
public bool AllocTextureArray(int numCubeMaps, int width, int height, TextureFormat format, bool isMipMapped)
public bool AllocTextureArray(int numCubeMaps, int width, TextureFormat format, bool isMipMapped)
m_numMipLevels = GetNumMips(width, height);
m_numMipLevels = GetNumMips(width, width);
cache = new CubemapArray(width, height, numCubeMaps, format, isMipMapped);
cache = new CubemapArray(width, numCubeMaps, format, isMipMapped);
cache.wrapMode = TextureWrapMode.Clamp;
return res;

{ ++iNumMips; uDim>>=1; }
return iNumMips;
}
}
}

8
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;
using System;
using System.Collections;

m_cubeCookieTexArray = new TextureCacheCubemap();
m_cubeReflTexArray = new TextureCacheCubemap();
m_cookieTexArray.AllocTextureArray(8, 128, 128, TextureFormat.Alpha8, true);
m_cubeCookieTexArray.AllocTextureArray(4, 512, 512, TextureFormat.Alpha8, true);
m_cubeReflTexArray.AllocTextureArray(64, 128, 128, TextureFormat.BC6H, true);
m_cubeCookieTexArray.AllocTextureArray(4, 512, TextureFormat.Alpha8, true);
m_cubeReflTexArray.AllocTextureArray(64, 128, TextureFormat.BC6H, true);
m_DeferredMaterial.SetTexture("_spotCookieTextures", m_cookieTexArray.GetTexCache());

m_cubeReflTexArray.NewFrame();
}
}
}
}
正在加载...
取消
保存