Search Issue Tracker

Won't Fix

Fixed in 2017.1.X

Won't Fix in 2017.2.X

Votes

0

Found in

5.4.1p3

Issue ID

840231

Regression

No

Graphics.CopyTexture should force mipmap generation for src if it is RT with (auto)generateMips set to true

Graphics - General

-

CopyTexture should force mipmap generation for src if it is RT with (auto)generateMips set to true

A RT may not have generated its mipmaps prior to being used as the src in a CopyTexture call. It would be nicer for users if CopyTexture made sure the src RT has generated its mipmaps before trying to copy it.

I've attached a project that can be used to verify this change. The Blit is done on the RT before the CopyTexture and currently the CopyTexture doens't copy the mip levels > 0 as the mipmaps weren't generated yet.

To repro:
1: Open attached project
2: Run in Editor on Windows OpenGLCore (OpenGL 4.5)
3: See that the bottom left quad is black when mip level is >0 (distance is futher)
4: After forcing mipmap generation in CopyTexture that bottom left quad should have all mipmap levels

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.