magick convert original/*.jpg -thumbnail 500x500^ -gravity center -extent 500x500 square/i.jpg
The output will be i-0.jpg, i-1.jpg ...
| /** | |
| * Lottery. Returns a won prize ID | |
| * Expected sheet structure. Please do not add header in the sheet. | |
| * | ID of prize | name of prize | num of stock | | |
| * | |
| * Example (https://docs.google.com/spreadsheets/d/1Z_G_VducsGqGtpLtzfEEaTE-7RSydmBgbOrGRUyt8uE/edit?usp=sharing) | |
| * | 1 | T shirt | 10 | | |
| * | 2 | Notepad | 5 | | |
| * | 4 | Sticker | 30 | | |
| */ |
| Shader "ku6ryo/ChromaKey" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _KeyColor("Key Color", Color) = (1, 1, 1, 1) | |
| _Acceptance("Acceptance", Range(0, 2)) = 1 | |
| } | |
| SubShader | |
| { |
magick convert original/*.jpg -thumbnail 500x500^ -gravity center -extent 500x500 square/i.jpg
The output will be i-0.jpg, i-1.jpg ...
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| public class Controller : MonoBehaviour | |
| { | |
| WebCamTexture webcamTexture; | |
| [SerializeField] |
| // This shader is written by refering the below articles. | |
| // Expanded the 2D voronoi example shader to 3D use case. | |
| // The base of the distance calculation is world position. | |
| // So the voronoi pattern moves is an object moves. | |
| // https://www.ronja-tutorials.com/post/028-voronoi-noise/ | |
| // https://www.ronja-tutorials.com/post/024-white-noise/ | |
| Shader "ku6ryo/Voronoi3dWorldPos" { | |
| Properties { |
| Shader "ku6ryo/PeriodicEmission" | |
| { | |
| // Slow blinking (depending on the time passed) emission effect shader made based on the Standard shader. | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,0,0,1) | |
| _Emission("Emission", Color) = (1,1,0,1) | |
| _Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
| _Metallic ("Metallic", Range(0,1)) = 0.0 | |
| } |
| Shader "ku6ryo/UnlitWireframe" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1, 1, 1, 1) | |
| _WireWidth ("Wire Width", Range(0, 1)) = 0.05 | |
| _Period ("Period", Range(0, 10)) = 1 | |
| } | |
| SubShader | |
| { |
| Shader "ku6ryo/LitTransparent" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,1,1,1) | |
| _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
| _Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
| _Metallic ("Metallic", Range(0,1)) = 0.0 | |
| } | |
| SubShader |
| Shader "ku6ryo/UnlitTransparent" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1, 1, 1, 1) | |
| _MainTex ("Texture", 2D) = "white" {} | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } |