|
|
|
|
|
|
m_GgxConvolveMaterial.SetFloat("_LastLevel", mipCount - 1); |
|
|
|
m_GgxConvolveMaterial.SetFloat("_InvOmegaP", invOmegaP); |
|
|
|
|
|
|
|
var cmd = CommandBufferPool.Get(""); |
|
|
|
//var cmd = CommandBufferPool.Get("");
|
|
|
|
cmd.BeginSample(sampleName); |
|
|
|
//cmd.BeginSample(sampleName);
|
|
|
|
|
|
|
|
MaterialPropertyBlock props = new MaterialPropertyBlock(); |
|
|
|
props.SetFloat("_Level", mip); |
|
|
|
|
|
|
Utilities.SetRenderTarget(context, target, ClearFlag.ClearNone, mip, (CubemapFace)face); |
|
|
|
|
|
|
|
var cmd = CommandBufferPool.Get(""); |
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
CommandBufferPool.Release(cmd); |
|
|
|
cmd.EndSample(sampleName); |
|
|
|
//cmd.EndSample(sampleName);
|
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
CommandBufferPool.Release(cmd); |
|
|
|
//context.ExecuteCommandBuffer(cmd);
|
|
|
|
//CommandBufferPool.Release(cmd);
|
|
|
|
} |
|
|
|
|
|
|
|
// Filters MIP map levels (other than 0) with GGX using BRDF importance sampling.
|
|
|
|