Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x.x] Fix temporary RTs having mips for no reason #2717

Merged
merged 1 commit into from Nov 24, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.universal/CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@ The version number for this package has increased due to a version update of a r

### Fixed
- Transparent Lit ShaderGraph using Additive blending will now properly fade with alpha [1270344]
- Fixed useless mip maps on temporary RTs/PostProcessing inherited from Main RT descriptor.

## [10.2.0] - 2020-10-19

Expand Down
Expand Up @@ -696,13 +696,17 @@ void CreateCameraRenderTarget(ScriptableRenderContext context, ref RenderTexture
{
bool useDepthRenderBuffer = m_ActiveCameraDepthAttachment == RenderTargetHandle.CameraTarget;
var colorDescriptor = descriptor;
colorDescriptor.useMipMap = false;
colorDescriptor.autoGenerateMips = false;
colorDescriptor.depthBufferBits = (useDepthRenderBuffer) ? k_DepthStencilBufferBits : 0;
cmd.GetTemporaryRT(m_ActiveCameraColorAttachment.id, colorDescriptor, FilterMode.Bilinear);
}

if (createDepth)
{
var depthDescriptor = descriptor;
depthDescriptor.useMipMap = false;
depthDescriptor.autoGenerateMips = false;
#if ENABLE_VR && ENABLE_XR_MODULE
// XRTODO: Enabled this line for non-XR pass? URP copy depth pass is already capable of handling MSAA.
depthDescriptor.bindMS = depthDescriptor.msaaSamples > 1 && !SystemInfo.supportsMultisampleAutoResolve && (SystemInfo.supportsMultisampledTextures != 0);
Expand Down
Expand Up @@ -131,6 +131,8 @@ public PostProcessPass(RenderPassEvent evt, PostProcessData data, Material blitM
public void Setup(in RenderTextureDescriptor baseDescriptor, in RenderTargetHandle source, in RenderTargetHandle destination, in RenderTargetHandle depth, in RenderTargetHandle internalLut, bool hasFinalPass, bool enableSRGBConversion)
{
m_Descriptor = baseDescriptor;
m_Descriptor.useMipMap = false;
m_Descriptor.autoGenerateMips = false;
m_Source = source;
m_Destination = destination;
m_Depth = depth;
Expand Down