This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// Author: pema99 | |
// This file contains functions that simulate Quad and Wave Intrinsics without access to either. | |
// For more information on those, see: https://github.com/Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics | |
// To use the functions, you must call SETUP_QUAD_INTRINSICS(pos) at the start of your fragment shader, | |
// where 'pos' is the pixel position, ie. the fragment input variable with the SV_Position semantic. | |
// Note that some functions will require SM 5.0, ie. #pragma target 5.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/GridAllocation" | |
{ | |
SubShader | |
{ | |
Tags { "Queue" = "Overlay" } | |
ZTest Always | |
Pass | |
{ | |
CGPROGRAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "AudioLink/AudioLinkUI" | |
{ | |
Properties | |
{ | |
_Gain("Gain", Range(0, 2)) = 1.0 | |
[ToggleUI] _Autogain("Autogain", Float) = 0.0 | |
_Threshold0("Low Threshold", Range(0, 1)) = 0.5 | |
_Threshold1("Low Mid Threshold", Range(0, 1)) = 0.5 | |
_Threshold2("High Mid Threshold", Range(0, 1)) = 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/Shadowed" | |
{ | |
SubShader | |
{ | |
Pass | |
{ | |
Tags { "LightMode"="Always" } | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/AudioLinkUI" | |
{ | |
Properties | |
{ | |
} | |
SubShader | |
{ | |
Pass | |
{ | |
CGPROGRAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float3 drawTopArea(float2 uv) | |
{ | |
float3 color = FOREGROUND_COLOR; | |
float areaWidth = 1.0 - FRAME_MARGIN * 2; | |
float areaHeight = 0.35; | |
float boxWidth = areaWidth / 4.0; | |
for (uint i = 0; i < 4; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float3 drawTopArea(float2 uv) | |
{ | |
float3 color = FOREGROUND_COLOR; | |
float areaWidth = 1.0 - FRAME_MARGIN * 2; | |
float areaHeight = 0.35; | |
float boxWidth = areaWidth / 4.0; | |
for (uint i = 0; i < 4; i++) | |
{ |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module { | |
types: { | |
[1]: Type { | |
name: None, | |
inner: Scalar { | |
kind: Float, | |
width: 4, | |
}, | |
}, | |
[2]: Type { |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module { | |
types: { | |
[1]: Type { | |
name: None, | |
inner: Scalar { | |
kind: Float, | |
width: 4, | |
}, | |
}, | |
[2]: Type { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Input program | |
sum List 'a = | |
| Cons 'a * List 'a | |
| Nil unit | |
let iota = [n] | |
let inner = rec [inner] [acc] | |
if acc >= n then Nil () | |
else Cons (acc, inner (acc + 1)) |