Hello, I am a student trying to implement my own real time pathtracer in DXR but I am facing a problem with properly loading textures into GPU memory under DX12. The app is based on Microsoft's DXR Samples and this is how I load the texture file:
![](https://uploads.gamedev.net/forums/monthly_2021_05/f19cabf6619c4ac88e65eb4cee197c39.image.png)
This is how I copy It from the upload heap into default heap along with other buffers
![](https://uploads.gamedev.net/forums/monthly_2021_05/cba6ce28a6924da496f723977ad48bf7.image.png)
This is how the CreateTextureSRV method is implemented:
![](https://uploads.gamedev.net/forums/monthly_2021_05/0d242c12b86c417ebcf528f2dc5777c9.image.png)
CreateDDSTextureFromFile12 is copied from “Introduction to 3D Game Programming in DirectX 12” by Frank Luna
This is how the texture appears in PIX
![](https://uploads.gamedev.net/forums/monthly_2021_05/78c568ed376844d8b32a2ece0aae3d78.image.png)
descriptor heap with the texture view
![](https://uploads.gamedev.net/forums/monthly_2021_05/cbc634799093417aafc2503e6a3319fd.image.png)
This is how it looks
![](https://uploads.gamedev.net/forums/monthly_2021_05/83ff728393d2422796fbb4b3399b5968.image.png)
Full source code in experimental branch: Microsista/Pathtracer (github.com)
What am I doing wrong? I've been sitting on this since yesterday and I can't figure it out.
Thanks