Skip to content

Instantly share code, notes, and snippets.

@smkplus
smkplus / UnityShaderCheatSheet.md
Last active March 18, 2024 14:25
Controlling fixed function states from materials/scripts in Unity

16999105_467532653370479_4085466863356780898_n

Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
 
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
@keijiro
keijiro / ToggleTest.shader
Last active March 24, 2023 00:43
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
@johnpaulmanoza
johnpaulmanoza / GPUImageFourInputFilter.h
Created April 13, 2015 06:06
GPUImage Add Four Input Filter
#import <GPUImageThreeInputFilter.h>
extern NSString *const kGPUImageFourInputTextureVertexShaderString;
@interface GPUImageFourInputFilter : GPUImageThreeInputFilter
{
GPUImageFramebuffer *fourthInputFramebuffer;
GLint filterFourthTextureCoordinateAttribute;
GLint filterInputTextureUniform4;
@tommeier
tommeier / image_save.sh
Created July 16, 2012 01:00
Bash script to download list of image urls to a location
while read p; do
echo "SAVING : $p"
filename=$(basename "$p")
extension="${filename##*.}"
filename="${filename%.*}"
echo " -- Filename : $filename"
curl -o "/file/save/location/$filename.$extension" "$p"
done < /soure/url/list/image_list.txt