Texture not working
Hi I was trying to setup directx 12 project following your tutorials (which are awesome btw :)). Everything is working fine, but I can't get the textures to work. Everything appear **black**, the textures aren't loading properly. The buffer views (matrix buffers) and shader resource views are all working fine. I can't seem to find the issue and could really use some help. thanks
did you try another image? support for the format of image you are using may not be implemented
on Nov 07 `16
iedoc
when debugging your code, stop it after you have an array of rgb(a) values for the image after you decrypt the image. You should look at the first couple pixels in that array to see what their values are. if they are all 0, you know there's an issue with the decryption, and your format may not be supported
on Nov 07 `16
iedoc
Hi @iedoc, I modified your project to load image and create srv using the way I was doing it in my project and it works (with your project).
The only difference is that I have a IDXGISwapChain while you use IDXGISwapChain3 (but that should not be the problem, right?). Also you use WaitForPreviousFrame() (at the start of each frame) while I Flush the CommandQueue at the end of each frame.
Can these account for it not working?
on Nov 08 `16
amuTBKT
yeah, you don't want to flush the command queue at the end because you just put all your stuff in there, and if you flush it before you use it you will lose all your commands. sorry, i didn't see your response until now. i'll have to add a "@someone" type notifications
on Nov 09 `16
iedoc
also swapchain3 expands on swapchain, so you might not be getting all the needed functionality or data when you just use swapchain, so i would switch to swapchain3 if possible
on Nov 09 `16
iedoc
Added WaitForPreviousFrame() and SwapChain3 but still not working :'(
Maybe something else is wrong. Been trying to fix for almost a week now :(
on Nov 12 `16
amuTBKT
Can I bind the srv as a ShaderResourceView instead of a descriptor table? The CreateGraphicsPipelineState() seems to fail now :(
on Nov 13 `16
amuTBKT
Did you try using a different image? Also did you debug and make sure the decoded rgb(a) values from the image are Not all Black?
on Nov 13 `16
iedoc
Yeah I did, and the image is loading perfectly fine
on Nov 13 `16
amuTBKT
could you pm me about this? it will be easier than working in the comments
on Nov 14 `16
iedoc
Sign in to comment
Chosen Answer
Hi, I finally solved the issue. I apparently closed the commandList after initializing it and thus my resource view wasn't getting initialized properly.