|
|
|
|
|
|
m_EntryPool.Add( ce ); |
|
|
|
} |
|
|
|
|
|
|
|
override public void DisplayShadowMap(CommandBuffer debugCB, Material debugMaterial, Vector4 scaleBias, uint slice, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue) |
|
|
|
override public void DisplayShadowMap(CommandBuffer debugCB, Material debugMaterial, Vector4 scaleBias, uint slice, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue, bool flipY) |
|
|
|
{ |
|
|
|
Vector4 validRange = new Vector4(minValue, 1.0f / (maxValue - minValue)); |
|
|
|
|
|
|
|
|
|
|
propertyBlock.SetFloat("_TextureSlice", (float)slice); |
|
|
|
propertyBlock.SetVector("_ValidRange", validRange); |
|
|
|
propertyBlock.SetFloat("_RequireToFlipInputTexture", flipY ? 1.0f : 0.0f); |
|
|
|
debugCB.SetViewport(new Rect(screenX, screenY, screenSizeX, screenSizeY)); |
|
|
|
debugCB.DrawProcedural(Matrix4x4.identity, debugMaterial, debugMaterial.FindPass("REGULARSHADOW"), MeshTopology.Triangles, 3, 1, propertyBlock); |
|
|
|
} |
|
|
|
|
|
|
cb.EndSample("VSM conversion"); |
|
|
|
} |
|
|
|
|
|
|
|
override public void DisplayShadowMap(CommandBuffer debugCB, Material debugMaterial, Vector4 scaleBias, uint slice, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue) |
|
|
|
override public void DisplayShadowMap(CommandBuffer debugCB, Material debugMaterial, Vector4 scaleBias, uint slice, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue, bool flipY) |
|
|
|
{ |
|
|
|
Vector4 validRange = new Vector4(minValue, 1.0f / (maxValue - minValue)); |
|
|
|
|
|
|
|
|
|
|
propertyBlock.SetFloat("_TextureSlice", (float)slice); |
|
|
|
propertyBlock.SetVector("_ValidRange", validRange); |
|
|
|
propertyBlock.SetFloat("_RequireToFlipInputTexture", flipY ? 1.0f : 0.0f); |
|
|
|
debugCB.SetViewport(new Rect(screenX, screenY, screenSizeX, screenSizeY)); |
|
|
|
debugCB.DrawProcedural(Matrix4x4.identity, debugMaterial, debugMaterial.FindPass("VARIANCESHADOW"), MeshTopology.Triangles, 3, 1, propertyBlock); |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override void DisplayShadow(CommandBuffer cmd, Material debugMaterial, int shadowRequestIndex, uint faceIndex, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue) |
|
|
|
public override void DisplayShadow(CommandBuffer cmd, Material debugMaterial, int shadowRequestIndex, uint faceIndex, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue, bool flipY) |
|
|
|
{ |
|
|
|
if (m_ShadowIndices.Count() == 0) |
|
|
|
return; |
|
|
|
|
|
|
ShadowData faceData = shadowDatas[(uint)(m_ShadowIndices[index] + offset + faceIndex)]; |
|
|
|
uint texID, samplerID; |
|
|
|
faceData.UnpackShadowmapId(out texID, out samplerID); |
|
|
|
m_Shadowmaps[texID].DisplayShadowMap(cmd, debugMaterial, faceData.scaleOffset, (uint) faceData.slice, screenX, screenY, screenSizeX, screenSizeY, minValue, maxValue); |
|
|
|
m_Shadowmaps[texID].DisplayShadowMap(cmd, debugMaterial, faceData.scaleOffset, (uint) faceData.slice, screenX, screenY, screenSizeX, screenSizeY, minValue, maxValue, flipY); |
|
|
|
public override void DisplayShadowMap(CommandBuffer cmd, Material debugMaterial, uint shadowMapIndex, uint sliceIndex, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue) |
|
|
|
public override void DisplayShadowMap(CommandBuffer cmd, Material debugMaterial, uint shadowMapIndex, uint sliceIndex, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue, bool flipY) |
|
|
|
m_Shadowmaps[index].DisplayShadowMap(cmd, debugMaterial, new Vector4(1.0f, 1.0f, 0.0f, 0.0f), sliceIndex, screenX, screenY, screenSizeX, screenSizeY, minValue, maxValue); |
|
|
|
m_Shadowmaps[index].DisplayShadowMap(cmd, debugMaterial, new Vector4(1.0f, 1.0f, 0.0f, 0.0f), sliceIndex, screenX, screenY, screenSizeX, screenSizeY, minValue, maxValue, flipY); |
|
|
|
} |
|
|
|
|
|
|
|
public override void SyncData() |
|
|
|