Search Issue Tracker
Fixed in 5.3.3
Votes
0
Found in
5.2.2p2
Issue ID
752855
Regression
Yes
[RenderTexture] GetNativeTexturePtr call on Antialiased Depth texture returns IntPtr.Zero
Update:
An extra function has been added to the D3D11 Native Rendering interface to allow for the retrieval of the native ID3DTexture type from a Unity RenderBuffer.
In order to replicate the previous functionality you will need to obtain the RenderBuffer for the depth buffer from the render target and pass it in to this function on the D3D Native Interface.
Steps to reproduce:
1. Open attached project
2. Open scene "testScene"
3. Open script "test.cs"
4. Notice that it creates Depth RenderTexture and sets it Antialiasing to 8. The "GetNativeTexturePtr is called on that texture. If IntPtr.Zero is returned then NULL is printed to console
5. Run scene and notice that NULL is printed in console
6. Stop the scene and in test.cs set antiAliasing property to 1
7. Run scene again and notice that NULL is no longer printed
8. Stop the scene and in test.cs set antiAliasing back to 8
9. In RenderTexture constructor (line 11), change RenderTextureFormat.Depth to RenderTextureFormat.Default
10. Run scene again ant notice that NULL isn't printed as well.
Reproduced with: 5.0.4f1, 5.1.4f1, 5.2.3p2, 5.3.0f4, 5.4.0a6
Not reproducible: 5.0.1f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Input from the "Backslash" key is not detected in the Web Player when using the Japanese 106/109 key keyboard
- High "Total" value of the "TerrainManager.CullAllTerrains" when generating terrain
- UI Layout rebuild triggered by a rounding error when using TextMesh Pro
- Sprite Shape Corners and Edges are invisible when a closed Sprite Shape is used
- Script icon Gizmos cause lag/performance issues in Scene view even when the Scene Camera is not pointed at Gizmos
Add comment