This file contains 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 "pema99/SlangMarcher" | |
{ | |
Properties | |
{ | |
_Iterations ("Max iterations", Float) = 128 | |
_MaxDist ("Max distance", Float) = 50 | |
_MinDist ("Min distance", Float) = 0.001 | |
} | |
SubShader | |
{ |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteAlways] | |
public class QuadLightEmitter : MonoBehaviour | |
{ | |
[ColorUsage(false, true)] | |
public Color color = Color.white; | |
public Transform[] verts; |
This file contains 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 an implementation of a data structure I've named a BufferMap. | |
// It works as a map from 'handles' to values, where handles are just integers. | |
// You insert values into the map, and are returned an automatically generated handle. | |
// You can then use this handle to retrieve the value, or remove it from the map. | |
// Handles are never invalidated until they are explicitly removed. | |
// Amortized time complexities for adding, removing and getting a value from | |
// the map are all O(1). Additionally, the data structure has the property that |
This file contains 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 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 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 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 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 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 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++) | |
{ |
NewerOlder