Jump to content
  • Advertisement
Sign in to follow this  
Tape_Worm

Scissor testing and Render target textures.

This topic is 4112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using scissor testing to perform clipping, and when that capability isn't available I use the viewport and projection matrix to provide my clipping. This system works fantastical. However, it seems as though when I apply this clipping to drawing things into a render target texture, the scissor test doesn't apply. The viewport + projection clip works fine so for now I'm using that as a fallback. However I'd like to know if this is a known limitation? I can't seem to find anything regarding any limitations with regards to scissor testing in the documentation except that switching render targets will reset the scissor test rectangle. However I've checked this and it's setting it after the target has been switched so it should be taking place. The scissor testing works just fine with the device, and with swapchains so I'm curious as to why it wouldn't apply to target textures?

Share this post


Link to post
Share on other sites
Advertisement
I'm dumb and totally forgot Microsoft put in the reference device. Upon checking the ref device I quickly realized that it was -my- mistake and my internal state manager wasn't updating the scissor rectangle state after the scissor enabled state had been updated. So it always thought it had the same rectangle, which wasn't true because the device reset caused the D3D scissor rectangle to reset to the dimensions of the target, thus a disconnect was created between my state and the D3D internal state.

So the lesson here boys and girls is: When in doubt, run the reference rasterizer.

You'd think I'd know this by now. It's not like I put in access to the ref device for something to do. I'm going to rant elsewhere now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!