0
\$\begingroup\$

How to cut part of the object if it is inside a specific area? like showed on attached image.

enter image description here

PS

Looks like stencil should be used, but I am not really sure how to do it.

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

If the area is a rectangle you can use a scissor rectangle. It sets that only part of the viewport gets drawn while everything outside of that is not drawn.

\$\endgroup\$
3
  • \$\begingroup\$ but I need other objects to be drawn outside of the rectangle, like on image. is that something scissor can do ? \$\endgroup\$
    – mgs_bravo
    Jan 4, 2019 at 15:25
  • \$\begingroup\$ @ChervonogradskyOleg you then only set the scissor on the objects that need it. \$\endgroup\$ Jan 4, 2019 at 15:27
  • \$\begingroup\$ okay. thanks. do you know how to do such cut in local coordinates ? \$\endgroup\$
    – mgs_bravo
    Jan 4, 2019 at 15:37
-2
\$\begingroup\$

This was achieved using stencil. case closed.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .