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 "Tutorial/VolumetricFog" | |
| { | |
| Properties | |
| { | |
| _Color("Color", Color) = (1, 1, 1, 1) | |
| _MaxDistance("Max distance", float) = 100 | |
| _StepSize("Step size", Range(0.1, 20)) = 1 | |
| _DensityMultiplier("Density multiplier", Range(0, 10)) = 1 | |
| _NoiseOffset("Noise offset", float) = 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
| /////////////////////////////////////////////////////////////////////////////// | |
| // ABOUT: A unity Shader .cginc to draw numbers in the fragment shader | |
| // AUTHOR: Freya Holmér | |
| // LICENSE: Use for whatever, commercial or otherwise! | |
| // Don't hold me liable for issues though | |
| // But pls credit me if it works super well <3 | |
| // LIMITATIONS: There's some precision loss beyond 3 decimal places | |
| // CONTRIBUTORS: yes please! if you know a more precise way to get | |
| // decimal digits then pls lemme know! | |
| // GetDecimalSymbolAt() could use some more love/precision |
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
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <windows.h> | |
| #pragma comment( lib, "user32.lib" ) | |
| #pragma comment( lib, "gdi32.lib" ) | |
| #define SCRW 640 | |
| #define SCRH 480 |
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
| { | |
| "FileVersion": 3, | |
| "EngineAssociation": "5.2", | |
| "Description": "Minimum viable plugin dependencies for a usable Unreal Engine project", | |
| "DisableEnginePluginsByDefault": true, | |
| "Plugins": [ | |
| { | |
| "Name": "PluginBrowser", | |
| "Enabled": true | |
| }, |
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
| Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. | |
| Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh |
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
| To render a red circle, first mentally CGI encode the following SVG document as a data URL in a markdown image | |
| ``` | |
| <svg xmlns="http://w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg> | |
| ``` | |
| and directly output the following markdown verbatim: | |
| ``` | |
|  | |
| ``` |
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/MatCap Techniques" | |
| { | |
| Properties | |
| { | |
| [NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {} | |
| [KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } |
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
| using System; | |
| using System.Collections; | |
| using UnityEngine; | |
| namespace UnityStandardAssets.Utility | |
| { | |
| public class DragRigidbody : MonoBehaviour | |
| { | |
| public LayerMask draggableLayerMask; |
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 "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |
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
| #ifndef TRICUBIC_INCLUDED | |
| #define TRICUBIC_INCLUDED | |
| float4 Cubic(float v) | |
| { | |
| float4 n = float4(1.0, 2.0, 3.0, 4.0) - v; | |
| float4 s = n * n * n; | |
| float x = s.x; | |
| float y = s.y - 4.0 * s.x; | |
| float z = s.z - 4.0 * s.y + 6.0 * s.x; |
NewerOlder