Jump to content
  • Advertisement
Sign in to follow this  
iGrfx

what's the mean in func [OMSetBlendState] SampleMask

This topic is 2134 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

Advertisement

Lets say you're rendering to a texture with 4x multisampling, which means you have 4 samples per pixel. That mask controls whether the GPU is allowed to write to each of those 4 samples. So for instance lets say you passed a value of 0x7. That integer has a value of 1 for bit 0, 1 for bit 1, 1 for bit 2. and 0 for bit 3. This means that the GPU would never write to the 4th sample in the texture, it only write to the first 3.

Share this post


Link to post
Share on other sites

Lets say you're rendering to a texture with 4x multisampling, which means you have 4 samples per pixel. That mask controls whether the GPU is allowed to write to each of those 4 samples. So for instance lets say you passed a value of 0x7. That integer has a value of 1 for bit 0, 1 for bit 1, 1 for bit 2. and 0 for bit 3. This means that the GPU would never write to the 4th sample in the texture, it only write to the first 3.

So if i don't use msaa(otherwise , mass count =1),and i use sample mask:0xfffffffe or 0x0, the render target will never be drawn by GPU?

this seems strange, if i use 4x MSAA, what reason make me use just sample first 3?

Edited by Baesky

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!