Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,10 @@ internal void ClearCache()
var desc = m_Cache.descriptor;
bool isMipped = desc.useMipMap;
int mipCount = isMipped ? GetNumMips(desc.width, desc.height) : 1;
for (int depthSlice = 0; depthSlice < desc.volumeDepth; ++depthSlice)
for (int mipIdx = 0; mipIdx < mipCount; ++mipIdx)
{
for (int mipIdx = 0; mipIdx < mipCount; ++mipIdx)
{
Graphics.SetRenderTarget(m_Cache, mipIdx, CubemapFace.Unknown, depthSlice);
GL.Clear(false, true, Color.clear);
}
Graphics.SetRenderTarget(m_Cache, mipIdx, CubemapFace.Unknown, -1);
GL.Clear(false, true, Color.clear);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,10 @@ internal void ClearCache()
var desc = m_Cache.descriptor;
bool isMipped = desc.useMipMap;
int mipCount = isMipped ? GetNumMips(desc.width, desc.height) : 1;
for (int depthSlice = 0; depthSlice < desc.volumeDepth; ++depthSlice)
for (int mipIdx = 0; mipIdx < mipCount; ++mipIdx)
{
for (int mipIdx = 0; mipIdx < mipCount; ++mipIdx)
{
for (int faceIdx = 0; faceIdx < 6; ++faceIdx)
{
Graphics.SetRenderTarget(m_Cache, mipIdx, (CubemapFace)faceIdx, depthSlice);
GL.Clear(false, true, Color.clear);
}
}
Graphics.SetRenderTarget(m_Cache, mipIdx, CubemapFace.Unknown, -1);
GL.Clear(false, true, Color.clear);
}
}

Expand Down