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
- Test Runner’s vertical scrollbar overlaps with the up and down arrows and upper toolbar tabs when the window is minimized
- The Input Field view is not updated when deleting lines of text
- The scrollbar does not respect empty lines in the Input Field
- “Texture Atlas Viewer“ button text overlaps another button when the UI Toolkit Debugger is narrowed
- Thresholds are no longer automatically calculated after deleting Motion fields in Blendtrees
Add comment