mViewportModifierMask = 0x00 ignored for PassClear with Direct3D 11 Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
Shimayama
Halfling
Posts: 74
Joined: Sat Apr 25, 2009 2:20 pm
Location: Norway
x 1

mViewportModifierMask = 0x00 ignored for PassClear with Direct3D 11

Post by Shimayama »

Setting passClear->mViewportModifierMask = 0xFF does not seem to have intended effect when Direct3D 11 is used. Instead of clearing only the viewport area of the render target, it clears the entire target. With OpenGL3Plus it works as intended.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5588
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1413
Contact:

Re: mViewportModifierMask = 0x00 ignored for PassClear with Direct3D 11

Post by dark_sylinc »

Hi!

I wanted to reply to your other post but unfortunately I didn't make it in time (your questions require long and complex answers).
This is something I wanted to warn you about: D3D11 does not allow clearing partial regions. Metal doesn't either. Only OpenGL allows it (at the cost of performance, since partial clears aren't fast). We corrected this mismatch in 2.2 (which is WIP) by having OpenGL behave the same way D3D11 & Metal do to avoid this kind of confusion.

Unfortunately, clearing using pass_clear only works on the whole render target.
Shimayama
Halfling
Posts: 74
Joined: Sat Apr 25, 2009 2:20 pm
Location: Norway
x 1

Re: mViewportModifierMask = 0x00 ignored for PassClear with Direct3D 11

Post by Shimayama »

Hi,

No problem :)

Ok, thanks for the info.

I changed my system slightly to do a full clear on the final render target before the per-viewport workspaces (if there is at least one viewport which want to render directly to the final render target, i.e. it does not have any post effects). I did this by adding a "clear" workspace that only have one node with a clear pass. Not sure if it is OK to have a workspace that only clears..?

But anyway, I stumpled upon the problem described in this post viewtopic.php?f=25&t=94104 which has somewhat blocked me from really testing the clearing stuff further.
Post Reply