The back buffer was cleared to solid red for now just for testing, and I've attempted to render a quadpanel to the center of it with a test image. As you can see, the red back buffer was rendered to the canvas quad nicely, but the test Imageimage I rendered to an imagethe panel is rendering transparently. I use the same shaders/hlsl files to render both the canvas and the panel on the canvas, so I'm skeptical that this is the source of the problem.
The call to textureUnlitShader.UpdateShader(...)
are most likely not the issue I've found. I tried commenting the line textureUnlitShader.SetTextureResource(..., canvases[i].shaderTexture)
that was set in the above code, and, as expected, instead of the render-to-texture buffer being rendered to the canvas, my test image was rendered to the quadcanvas. But interestingly enough, the hole remained. Which leads me to believe that the quadpanel is not actually being rendered to the canvas's texture properly. Rather, and ratherit seems to be being rendered somehow separately. Which leads me to believe that the most likely culprit is the way I'm implementing the render to texture technique that is somehow off. Here's a screenshot of when that happens:
I don't believe much could have gone wrong with panel itself. The matrix constant buffer seems to be being written to properly, as the quadpanel renders in the right spot on the canvas. And the vertex-position/uv-coord constant buffer is identical to the structure of the canvas's vertex-position/uv-coord constant buffer. To make sure of this, I've read over the section a couple of times now and ran through it with some break points set to make sure that these buffers we're being written correctly. Nothing turned up out of the ordinary.