Uploaded October 2021 | Updated November 2026, 2 hours ago
The Windows Terminal is a new terminal for Windows that allows you to run PowerShell, Command Prompt, the Azure Command Shell or any other terminal environment. One of the cool experimental features it includes is the ability to run a custom DirectX pixel shader when rendering the terminal. This can allow you to customize your prompt and create cool visual effects in your Terminal. Let's explore how you can configure and create your own shader for the Windows Terminal!
To use a shader you will need to update your Windows Terminals `settings.json` file to point to a DirectX pixel shader file. The setting is called "experimental.pixelShaderPath" and is located in your terminals "profiles". In this example we'll be applying the shader to every profile in our terminal by default by updating our settings file like this:
```diff
"profiles":
{
"defaults":
{
...
+ "experimental.pixelShaderPath": "The absolute path to our shader.hlsl",
}
}
```
A basic shader that just rerenders the sampled terminal input might look like this:
```hlsl
Texture2D shaderTexture;
SamplerState samplerState;
float4 main(float4 pos : SV_POSITION, float2 tex : TEXCOORD) : SV_TARGET {
return shaderTexture.Sample(samplerState, tex);
}
```
It includes a `shaderTexture` which is a Texture that contains the rendered content of the Terminal prior to your shader being applied. This means it will include the colored text but none of your effects. A `samplerState` is also provided which provides state information about sampling the texture.
The shader requires a `main` method that returns a four dimensional vector containing the red, green, blue and alpha channels to render. A transparent result will render the background of your terminal profile.
To modify the behavior of the shader, change the results returned from the `main` method to match your desired outcome and update the Windows Terminal. You should be able to see the results of your changes. For example our shader that only renders the red channel of our terminal has a `main` method that looks like this:
```hlsl
float4 main(float4 pos : SV_POSITION, float2 tex : TEXCOORD) : SV_TARGET {
float4 color = shaderTexture.Sample(samplerState, tex);
return float4(color.r, 0, 0, color.a) ;
}
```
Some additional documentation on Windows Terminal pixel shaders is available on the Windows Terminal GitHub page here: github.com/microsoft/terminal/blob/main/samples/PixelShaders/README.md
That README includes additional information including how to access the `PixelShaderSettings` which provide information such as a `Time` variable to create animated effects!
***
If you'd like to add a shortcut that can toggle shader effects on or off then you can add an action to your Windows Terminals `settings.json` file. In the `actions` block add an entry for `toggleShaderEffects` like this:
```json
"actions":
[
...
{
"command": "toggleShaderEffects",
"keys": "shift+f10"
}
]
```
In my example pressing the Shift and F10 key would toggle shader effects.
***
If you don't have the Windows Terminal you can download it here: microsoft.com/en-us/p/windows-terminal/9n0dx20hk701
You can find some additional examples of Windows Terminal shaders here: github.com/Hammster/windows-terminal-shaders
My pride flag Windows Terminal shader is located here: worldofzero.com/posts/pride-windows-terminal
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
The Windows Terminal is a new terminal for Windows that allows you to run PowerShell, Command Prompt, the Azure Command Shell or any other terminal environment. One of the cool experimental features it includes is the ability to run a custom DirectX pixel shader when rendering the terminal. This can allow you to customize your prompt and create cool visual effects in your Terminal. Let's explore how you can configure and create your own shader for the Windows Terminal!
To use a shader you will need to update your Windows Terminals `settings.json` file to point to a DirectX pixel shader file. The setting is called "experimental.pixelShaderPath" and is located in your terminals "profiles". In this example we'll be applying the shader to every profile in our terminal by default by updating our settings file like this:
```diff
"profiles":
{
"defaults":
{
...
+ "experimental.pixelShaderPath": "The absolute path to our shader.hlsl",
}
}
```
A basic shader that just rerenders the sampled terminal input might look like this:
```hlsl
Texture2D shaderTexture;
SamplerState samplerState;
float4 main(float4 pos : SV_POSITION, float2 tex : TEXCOORD) : SV_TARGET {
return shaderTexture.Sample(samplerState, tex);
}
```
It includes a `shaderTexture` which is a Texture that contains the rendered content of the Terminal prior to your shader being applied. This means it will include the colored text but none of your effects. A `samplerState` is also provided which provides state information about sampling the texture.
The shader requires a `main` method that returns a four dimensional vector containing the red, green, blue and alpha channels to render. A transparent result will render the background of your terminal profile.
To modify the behavior of the shader, change the results returned from the `main` method to match your desired outcome and update the Windows Terminal. You should be able to see the results of your changes. For example our shader that only renders the red channel of our terminal has a `main` method that looks like this:
```hlsl
float4 main(float4 pos : SV_POSITION, float2 tex : TEXCOORD) : SV_TARGET {
float4 color = shaderTexture.Sample(samplerState, tex);
return float4(color.r, 0, 0, color.a) ;
}
```
Some additional documentation on Windows Terminal pixel shaders is available on the Windows Terminal GitHub page here: github.com/microsoft/terminal/blob/main/samples/PixelShaders/README.md
That README includes additional information including how to access the `PixelShaderSettings` which provide information such as a `Time` variable to create animated effects!
***
If you'd like to add a shortcut that can toggle shader effects on or off then you can add an action to your Windows Terminals `settings.json` file. In the `actions` block add an entry for `toggleShaderEffects` like this:
```json
"actions":
[
...
{
"command": "toggleShaderEffects",
"keys": "shift+f10"
}
]
```
In my example pressing the Shift and F10 key would toggle shader effects.
***
If you don't have the Windows Terminal you can download it here: microsoft.com/en-us/p/windows-terminal/9n0dx20hk701
You can find some additional examples of Windows Terminal shaders here: github.com/Hammster/windows-terminal-shaders
My pride flag Windows Terminal shader is located here: worldofzero.com/posts/pride-windows-terminal
Join the World of Zero Discord Server: discord.gg/hU5Kq2u


).GetAwaiter().GetResult();
```
Find a `Camera` object in the current scene:
```csharp
cameraObject = await CSharpScript.EvaluateAsync[GameObject](GameObject.FindObjectsOfType[Camera]().First().gameObject,
ScriptOptions.Default.WithImports( // Import namespaces to simplify scripts
System,
System.Collections.Generic,
System.Linq,
UnityEngine
).AddReferences( // Include additional assemblies
typeof(System.Linq.Enumerable).Assembly,
typeof(UnityEngine.Transform).Assembly
));
```
The Roslyn Scripting API is documented on GitHub: https://github.com/dotnet/roslyn/wiki/Scripting-API-Samples
You can find the Nuget package here: https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Runtime C# Scripting - Embedding the .NET Roslyn Compiler in Unity](https://i.ytimg.com/vi/YtzYkoWhrTk/mqdefault.jpg)

 and [Nuget](https://www.nuget.org/packages/TrieNet/). You can find more documentation and learn about its other features here: https://github.com/gmamaladze/trienet
If you want to learn more about how Tries work as a data structure you can learn more about that on Wikipedia: https://en.wikipedia.org/wiki/Trie
If youre interested in how to build a `Trie` from scratch weve done that in an earlier video you can find here: https://www.youtube.com/watch?v=4nmVXKu6e_Q
For more information about the Mermaid diagrams I use at the start of this video, check out [my video on Mermaid JS](https://www.youtube.com/watch?v=7_2IroEs6Is). Recently support for these diagrams was even [added to GitHub](https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams).
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Trie, Trie Again - A String Search Data Structure](https://i.ytimg.com/vi/ZgZXW_V-2lo/mqdefault.jpg)



![Using PowerShell to Create a Symbolic Link on Windows
Symbolic Links allow you to create a reference in your file system to another file or directory. This allows you to reference the same file in multiple places without having to physically copy it into each place. This can save storage space and also allows a single change to the file to be seen by every location that links to it as well.
In this video well be taking a look at how to create these Symbolic Links from PowerShell using a version of the `New-Item` commandlet. In order to take advantage of this youll need to be running in an Administrator PowerShell or you may see the New-Item : Administrator privilege required for this operation error. This solution is able to create symbolic links between files or directories and also will detect if the target item you are creating the link to exists or not before generating the link.
In order to create the symlink in PowerShell youll run this command:
```ps1
New-Item -ItemType SymbolicLink -Path [path] -Target [target]
```
This will create a new Item at the provided path that represents a link to the target file or directory.
If you prefer Command Prompt you can learn how to make a symbolic link in Command Prompt here: https://youtu.be/w2gxWTOPw7U
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using PowerShell to Create a Symbolic Link on Windows](https://i.ytimg.com/vi/_VnONfOgP8M/mqdefault.jpg)

