- Home /
Question by
unity_BV3zdcbOKMN6Hg · Dec 30, 2019 at 08:05 AM ·
script.shadow
CommandBuffer: temporary render texture _MainLightShadowmapTexture not found while executing Blur Main Shadowmap Texture (Blit source)
hi: I want to blur shadowmap. so, i add a pass after shadowmap; but there is an error. My code is below: CommandBuffer: temporary render texture _MainLightShadowmapTexture not found while executing Blur Main Shadowmap Texture (Blit source) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) NullReferenceException: Object reference not set to an instance of an object public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { if (m_BlurMaterial == null) return;
CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag);
using (new ProfilingSample(cmd, m_ProfilerTag))
{
cmd.GetTemporaryRT(m_MainLightBlurShadowmap.id, descriptor, FilterMode.Bilinear);
RenderTargetIdentifier blurShadowMapTexture = m_MainLightBlurShadowmap.Identifier();
ConfigureTarget(blurShadowMapTexture);
cmd.Blit(source.id, m_MainLightBlurShadowmap.Identifier(), m_BlurMaterial);
}
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612220807im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Actual dimensions of shadow cascades 0 Answers
Unity 3d Lights, Shadows and material of objects? 1 Answer
Unity snaps : shadow leaks when baking lights 1 Answer
Static member cannot be accessed 2 Answers
Better Random World generator c# 1 Answer