# Shader Extension

**URL:** https://forum.makecode.com/t/shader-extension/4860
**Category:** Show & Tell
**Tags:** extension
**Created:** [December 9, 2020, 1:21am UTC](https://forum.makecode.com/t/shader-extension/4860 "2020-12-09T01:21:12Z")
**Posts on this page:** 20
**Page:** 1

<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 9, 2020, 1:21am UTC](https://forum.makecode.com/t/shader-extension/4860/1 "2020-12-09T01:21:12Z")

</div>

This was a request I got on stream on Monday: a shader extension!

 ![2020-12-08 17.17.00](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/46607e58a7ddfad6e84e38ea2441b160cd8e1bc7.gif)

This extension lets you use images or rectangles to define parts of the screen to shade.

Grab it at [riknoll/arcade-shader](https://github.com/riknoll/arcade-shader/tree/master)

Here is an example for that gif above:

> **[shader-example](https://arcade.makecode.com/79480-46939-24924-20309)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

And here’s another example that @shakao made on how to use it to make shadows for sprites

> **[shader-example2](https://arcade.makecode.com/34463-26373-00334-92361)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

**warning** : the more of the screen you shade, the slower your game will be! that GIF above runs at 15 FPS on my pygamer and it only has two sprites. To make your game faster, use shaders lightly and use rectangles where possible (they are much faster). Also, avoid double-shading the same area.

---

<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 9, 2020, 1:48am UTC](https://forum.makecode.com/t/shader-extension/4860/2 "2020-12-09T01:48:20Z")

</div>

Also, don’t be afraid to use it because of that warning! Just keep it in mind if your game seems slow. Small shaders run pretty well

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [December 9, 2020, 2:15pm UTC](https://forum.makecode.com/t/shader-extension/4860/3 "2020-12-09T14:15:48Z")

</div>

That´s satisfying. You could make optical illusions with the shaders

---

<div class="post-metadata">

### Author: ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)
#### Post date: [January 8, 2021, 4:55pm UTC](https://forum.makecode.com/t/shader-extension/4860/4 "2021-01-08T16:55:56Z")

</div>

cool, how do i download extensions

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [January 8, 2021, 5:00pm UTC](https://forum.makecode.com/t/shader-extension/4860/5 "2021-01-08T17:00:08Z")

</div>

1. Expand the `Advanced` tab in the editor:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2d12bbbcd46bcd2fb7040f1dc57f32202f36a174.png)
2. Scroll down and click on `Extensions`:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fb73977d1874db91da71ea15ac4231f43ff99c71.png)
3. Select an extension you want to install!  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e25a1b130e0e7bcabbf3887f96b9a52a4d03b6f7.png)  
3.1 Or, if the extension isn’t listed, then paste in the GitHub URL (for this extension, it’s [https://github.com/riknoll/arcade-shader/tree/master](https://github.com/riknoll/arcade-shader/tree/master)) in the `Search or enter project URL...` box.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/8dd17948570f95e7112688b22d73e1e418302eab.png)  
3.2 Press enter and select the extension!

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [January 17, 2021, 2:55am UTC](https://forum.makecode.com/t/shader-extension/4860/6 "2021-01-17T02:55:12Z")

</div>

If I set a shader sprite to be invisible, will it stop “shading” so that it will use less resources? Or can you add a block to turn shading off for a particular shader? (So it disappears, but I enable shading, then it would be right back there?)

---

<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: [February 24, 2021, 11:35pm UTC](https://forum.makecode.com/t/shader-extension/4860/7 "2021-02-24T23:35:37Z")

</div>

@UnsignedArduino oh boy, sorry for the super late response but an invisible shader sprite does prevent it from using more resources. If you don’t see the shader effect, it isn’t happening.

---

<div class="post-metadata">

### Author: ![Primal\_Nexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/primal_nexus/32/3540_2.png) [@Primal\_Nexus](https://forum.makecode.com/u/Primal_Nexus)
#### Post date: [February 25, 2021, 3:55pm UTC](https://forum.makecode.com/t/shader-extension/4860/8 "2021-02-25T15:55:21Z")

</div>

@mmoskal would this extension work well on a Kitronik Arcade???

I’m asking in relation to the Biggest Game since we want to use @kwx’s Space Rocks 3D, which can plummet the FPS alone, so I’m wondering whether shadows will break the game.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [February 25, 2021, 4:49pm UTC](https://forum.makecode.com/t/shader-extension/4860/9 "2021-02-25T16:49:02Z")

</div>

Shadows will probably set your Meowbit on fire if you pair it with the his space rocks 3D game. Or just won’t load because of insufficient memory. The Meowbit is already pretty tight compared to the PyGamer and PyBadges.

---

<div class="post-metadata">

### Author: ![Primal\_Nexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/primal_nexus/32/3540_2.png) [@Primal\_Nexus](https://forum.makecode.com/u/Primal_Nexus)
#### Post date: [February 25, 2021, 6:24pm UTC](https://forum.makecode.com/t/shader-extension/4860/10 "2021-02-25T18:24:06Z")

</div>

@UnsignedArduino yes, but I want to know about the Kitronik Arcade only, since that’s my hardware, hence I am asking @mmoskal to tell me.

Good info though 👍🏼

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [February 25, 2021, 6:25pm UTC](https://forum.makecode.com/t/shader-extension/4860/11 "2021-02-25T18:25:17Z")

</div>

Oh lol sorry I thought the Kitronik Arcade was a different name for the Meowbit sorry lol 😅

---

<div class="post-metadata">

### Author: ![Primal\_Nexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/primal_nexus/32/3540_2.png) [@Primal\_Nexus](https://forum.makecode.com/u/Primal_Nexus)
#### Post date: [February 25, 2021, 6:31pm UTC](https://forum.makecode.com/t/shader-extension/4860/12 "2021-02-25T18:31:44Z")

</div>

Oh lol @UnsignedArduino that was what is called ‘_ **HUMAN ERROR** _’

---

<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: [February 25, 2021, 6:33pm UTC](https://forum.makecode.com/t/shader-extension/4860/13 "2021-02-25T18:33:03Z")

</div>

The Kitronik Arcade uses the same MCU as the Pygamer I believe, so it should be more powerful than a Meowbit. That being said, the best way to test these things usually is just to try it out!

---

<div class="post-metadata">

### Author: ![Primal\_Nexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/primal_nexus/32/3540_2.png) [@Primal\_Nexus](https://forum.makecode.com/u/Primal_Nexus)
#### Post date: [February 25, 2021, 7:46pm UTC](https://forum.makecode.com/t/shader-extension/4860/14 "2021-02-25T19:46:58Z")

</div>

Anyways, I can bet that the FPS on something even as great as the Arcade would plummet to a downright 10-20! I think that the Arcade is the best piece of hardware for MakeCode Arcade right? If so, that means that there needs to be a version 2!

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [February 25, 2021, 8:26pm UTC](https://forum.makecode.com/t/shader-extension/4860/15 "2021-02-25T20:26:32Z")

</div>

It’s actually the Raspberry Pi - it can have up to 8GB of RAM it has a beefy 4 core CPU.

---

<div class="post-metadata">

### Author: ![Primal\_Nexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/primal_nexus/32/3540_2.png) [@Primal\_Nexus](https://forum.makecode.com/u/Primal_Nexus)
#### Post date: [February 25, 2021, 9:09pm UTC](https://forum.makecode.com/t/shader-extension/4860/16 "2021-02-25T21:09:47Z")

</div>

Wow @UnsignedArduino, thanks for that!

---

<div class="post-metadata">

### Author: ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)
#### Post date: [February 25, 2021, 9:09pm UTC](https://forum.makecode.com/t/shader-extension/4860/17 "2021-02-25T21:09:56Z")

</div>

It has infinite potential if you stack pis

---

<div class="post-metadata">

### Author: ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)
#### Post date: [February 25, 2021, 9:45pm UTC](https://forum.makecode.com/t/shader-extension/4860/18 "2021-02-25T21:45:02Z")

</div>

I have a raspberry pi!

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [February 25, 2021, 9:45pm UTC](https://forum.makecode.com/t/shader-extension/4860/19 "2021-02-25T21:45:28Z")

</div>

How do you “stack” Pis?

---

<div class="post-metadata">

### Author: ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)
#### Post date: [February 25, 2021, 10:41pm UTC](https://forum.makecode.com/t/shader-extension/4860/20 "2021-02-25T22:41:33Z")

</div>

Complicated to explain. You can google it. It basically adds up their stats somewhat.  
[How to stack pis.](https://www.picocluster.com/blogs/picocluster-assembly-instructions/raspberry-pi-board-stack)

[Next page](https://forum.makecode.com/t/shader-extension/4860.md?page=2)
