[Bf-codereview] On-surface brush (issue 5554059)

NicholasBishop at gmail.com NicholasBishop at gmail.com
Mon Feb 13 20:30:10 CET 2012


On 2012/02/13 19:21:04, nicholasbishop wrote:
> Fix texture overlay and update comment

A couple updates:
* Thanks for the explanation of the stencil stuff psy-fi, I updated the
comment.

* The texture overlay option now gets stenciled when wrap mode is on.
Since brush texture sampling is screen-space, there's no need to map the
texture to the object to draw it correctly. As with the existing texture
overlay, this will not draw the texture if the mapping mode is 3D
(rather than Fixed or Tiled.) 3D mode would require evaluating face
vertices individually and drawing with e.g. glColorMaterial. I'd
consider this a separate feature though, prefer to wait on implementing
that.

A couple of additional notes:
* The existing overlay code draws textures in the "tiled" mapping mode
across the entire view, rather than just inside the brush circle. When
stenciling is on, it now gets clipped to the brush sphere. Both
behaviors make some sense, but maybe we should choose one and stick to
it.
* The existing overlay code draw the texture alpha flipped, so
transparent areas are darkest. This is a bit counter-intuitive to me,
especially since the radial control (FKEY) does not invert. Again, might
be nice to choose one.

http://codereview.appspot.com/5554059/


More information about the Bf-codereview mailing list