# A bit of shading in 3d

**URL:** <https://forum.kirupa.com/t/a-bit-of-shading-in-3d/300154>\
**Category:** Uncategorized\
**Created:** [November 16, 2009, 11:13pm UTC](https://forum.kirupa.com/t/a-bit-of-shading-in-3d/300154 "2009-11-16T23:13:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![renton79](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@renton79](https://forum.kirupa.com/u/renton79)\
**Post date:** [November 16, 2009, 11:13pm UTC](https://forum.kirupa.com/t/a-bit-of-shading-in-3d/300154/1 "2009-11-16T23:13:11Z")

</div>

I have written a simple 3d engine, it works smooth with any objects and now I wrote down a simple flat shader which works fine but unfortunately I have to use old moveTo lineTo drawing API to be able to draw each triangle with different shading alpha, does anyone knows if I could use drawTriangle method with diffent alpha for each triangle?

I’d prefer it as I use it in my code for bitmap drawing

Dave
