Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}| // Modified version of a tilt shift shader from Martin Jonasson (http://grapefrukt.com/) | |
| // Read http://notes.underscorediscovery.com/ for context on shaders and this file | |
| // License : MIT | |
| uniform sampler2D tex0; | |
| varying vec2 tcoord; | |
| varying vec4 color; | |
| /* | |
| Take note that blurring in a single pass (the two for loops below) is more expensive than separating |
| /** | |
| * Easing | |
| * Animates the value of a float property between two target values using | |
| * Robert Penner's easing equations for interpolation over a specified Duration. | |
| * | |
| * Original Author: Darren David darren-code@lookorfeel.com | |
| * | |
| * Ported to be easily used in Unity by Marco Mastropaolo | |
| * | |
| * Credit/Thanks: |
| Shader "UI/Dissolve" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| _StencilComp ("Stencil Comparison", Float) = 8 | |
| _Stencil ("Stencil ID", Float) = 0 | |
| _StencilOp ("Stencil Operation", Float) = 0 |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering.PostProcessing; | |
| [Serializable] | |
| [PostProcess( typeof( EdgeDetectRenderer ), PostProcessEvent.BeforeStack, "Custom/EdgeDetectNormals" )] | |
| public sealed class EdgeDetect : PostProcessEffectSettings { | |
| public enum EdgeDetectMode { |
| 0-mail.com | |
| 007addict.com | |
| 020.co.uk | |
| 027168.com | |
| 0815.ru | |
| 0815.su | |
| 0clickemail.com | |
| 0sg.net | |
| 0wnd.net | |
| 0wnd.org |
| // Apply this to a Camera, and make a material with the shader. | |
| public class CameraRenderWithMaterial : MonoBehaviour | |
| { | |
| public Material material; | |
| void OnRenderImage(RenderTexture source, RenderTexture destination) | |
| { | |
| Graphics.Blit(source, destination, material); | |
| } | |
| } |
Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}| // takes either a unix time number, string or a Date object and returns time string | |
| export const timeAgo = (time: number | string | Date) => { | |
| switch (typeof time) { | |
| case "number": | |
| break; | |
| case "string": | |
| time = +new Date(time); | |
| break; | |
| case "object": |
New keyword mod allows declaration of a sub-module. This allows discovery of modules within a crate as well as providing a single entry point for processing preprocessor directives. Modules follow rust rules such that if a crate is called x which has a sub-module a, the canonical name for the module will be x::a. x::a is added to x's symbol scope. Additional keywords self, super, and crate allow users to refer to modules relative to the current module.