浏览代码

Fixed typo when setting rendertargets.

/main
Felipe Lira 7 年前
当前提交
1cbd9d71
共有 2 个文件被更改,包括 6 次插入7 次删除
  1. 1
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/DepthOnlyPass.cs
  2. 12
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/ScriptableRenderPass.cs

1
ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/DepthOnlyPass.cs


else
context.DrawRenderers(cullResults.visibleRenderers, ref drawSettings, renderer.opaqueFilterSettings);
}
//cmd.SetGlobalTexture(depthTextureID, depthTexture);
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
}

12
ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/ScriptableRenderPass.cs


public TextureDimension textureDimension { get; private set; }
protected List<ShaderPassName> m_ShaderPassNames = new List<ShaderPassName>();
int samples;
public ScriptableRenderPass(LightweightForwardRenderer renderer)

RenderBufferStoreAction colorStoreAction, ClearFlag clearFlag, Color clearColor)
{
if (textureDimension == TextureDimension.Tex2DArray)
CoreUtils.SetRenderTarget(cmd, colorAttachmentHandle, clearFlag, clearColor, 0, CubemapFace.Unknown, -1);
CoreUtils.SetRenderTarget(cmd, colorAttachment, clearFlag, clearColor, 0, CubemapFace.Unknown, -1);
CoreUtils.SetRenderTarget(cmd, colorAttachmentHandle, colorLoadAction, colorStoreAction, clearFlag, clearColor);
CoreUtils.SetRenderTarget(cmd, colorAttachment, colorLoadAction, colorStoreAction, clearFlag, clearColor);
}
public void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorAttachment, RenderBufferLoadAction colorLoadAction,

if (textureDimension == TextureDimension.Tex2DArray)
CoreUtils.SetRenderTarget(cmd, colorAttachmentHandle, depthAttachmentHandle,
CoreUtils.SetRenderTarget(cmd, colorAttachment, depthAttachment,
CoreUtils.SetRenderTarget(cmd, colorAttachmentHandle, colorLoadAction, colorStoreAction,
depthAttachmentHandle, depthLoadAction, depthStoreAction, clearFlag, clearColor);
CoreUtils.SetRenderTarget(cmd, colorAttachment, colorLoadAction, colorStoreAction,
depthAttachment, depthLoadAction, depthStoreAction, clearFlag, clearColor);
}
}
}
正在加载...
取消
保存