Search Issue Tracker

Fixed in 2020.2.X

Fixed in 2019.3.X, 2020.1.X

Votes

0

Found in

2019.2

2019.3.0f4

2020.1

Issue ID

1208825

Regression

No

2019.3: Graphics.CopyTexture does not work with Texture3D

Graphics - General

-

Reproduction steps:
1. Open project in "MyRepro.zip"
2. Script in the "Editor" folder creates a Texture3D using 2D Textures in "Textures" folder
3. Go BugReport -> Create Texture3D (MenuItem)
4. Create a Material with Unlit/Texture3D Shader
5. Assign the "Texture3D" to the Material
6. Preview Material as it would look on Quad and move Slice Slider

Expected results: you are able to see all 3 2D Slices by sliding the bar and they look the same as in original images (Example: BugReport -> Create Texture3D via SETPIXELS)
Actual results: Slices are set incorrectly, clumped together, same image displayed multiple times

Reproducible with: 2019.2.19f1, 2019.3.0f6, 2020.1.0a21
Could not test with: 2017.4, 2018.4 because changing Material Slice value does not change the image shown in preview

Note: Graphics.CopyTexture(Texture src, int srcElement, Texture dst, int dstElement) does not appear in documentation but is used in this project

Comments (1)

  1. ceitel

    Aug 11, 2020 00:30

    I am using 2019.3.7f1, and successfully able to copy single mip slices into a mip level, however, with 2019.4.7f1 the mipmaps are broken and it appears that the data is either not being placed into the correct mip level anymore or something else is broken.

    public void CopyToTexture3D(Texture3D texture3D)
    {
    Texture2D slice = new Texture2D(this.width, this.height, this.textureFormat, false);
    slice.LoadRawTextureData(this.data);
    slice.Apply();
    Graphics.CopyTexture(slice, 0, 0, 0, 0, this.width, this.height, texture3D, this.slice, this.mip, 0, 0);
    }

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.