# What's rendered by on shade at z depth 80?

**URL:** <https://forum.makecode.com/t/whats-rendered-by-on-shade-at-z-depth-80/867>\
**Category:** Arcade\
**Created:** [December 6, 2019, 5:19pm UTC](https://forum.makecode.com/t/whats-rendered-by-on-shade-at-z-depth-80/867 "2019-12-06T17:19:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)\
**Post date:** [December 6, 2019, 5:19pm UTC](https://forum.makecode.com/t/whats-rendered-by-on-shade-at-z-depth-80/867/1 "2019-12-06T17:19:15Z")

</div>

[https://arcade.makecode.com/developer/game-loop](https://arcade.makecode.com/developer/game-loop) mentions

> - `z index 80` : `on shade` events are run and applied to the screen.

What are these? What’s a good example of one?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [December 6, 2019, 6:44pm UTC](https://forum.makecode.com/t/whats-rendered-by-on-shade-at-z-depth-80/867/2 "2019-12-06T18:44:30Z")

</div>

I don’t think there is anything built-in, but you can use the `game.onShade()` API to run code in this step. That’s how the lighting works in the “dark duck” game; after everything else is drawn to the screen the `onShade` code is run and it “darkens” the pixels based on the light source.
