Skip to content

Instantly share code, notes, and snippets.

View smkplus's full-sized avatar
😍
Curios

Seyed Morteza Kamali smkplus

😍
Curios
View GitHub Profile
@smkplus
smkplus / UnityShadersCheatSheet.shader
Created February 10, 2020 03:24 — forked from Split82/UnityShadersCheatSheet.shader
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@smkplus
smkplus / Shader_Cheat-Sheet.cs
Created February 7, 2020 21:08 — forked from quizcanners/Unity Fragment Shader Cheat Sheet .cs
To keep snippets of code for Shaders. Just some stuff that I often use but also often forget because brain=poo
//https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html
//https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/CGIncludes/UnityCG.cginc - Most interesting stuff ;)
//https://github.com/TwoTailsGames/Unity-Built-in-Shaders/tree/master/CGIncludes
//https://docs.unity3d.com/Manual/SL-Shader.html
//http://developer.download.nvidia.com/CgTutorial/cg_tutorial_appendix_e.html
//https://unity3d.com/how-to/shader-profiling-and-optimization-tips
//https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html
//http://www.deepskycolors.com/archive/2010/04/21/formulas-for-Photoshop-blending-modes.html
//http://www.iquilezles.org/blog/
//Properties
@smkplus
smkplus / LightweightPipelineTemplateShader.shader
Created January 31, 2020 10:44 — forked from andybak/LightweightPipelineTemplateShader.shader
Template shader to use as guide to create Lightweight Pipeline ready shaders.
// When creating shaders for Lightweight Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this simplified version as a base.
// Please not this should be only use for reference only.
// It doesn't match neither performance not feature completeness of Lightweight Pipeline Standard shader.
Shader "LightweightPipeline/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@smkplus
smkplus / DirectionGizmos.md
Created January 8, 2020 17:13
DirectionGizmos
using UnityEditor;
using UnityEngine;

public class DirectionGizmos : MonoBehaviour
{
    public Transform target;
    public Color color = Color.red;
    public float thickness = 2;
@smkplus
smkplus / ScreenSpaceDragAndDrop.md
Created December 4, 2019 20:26
ScreenSpaceDragAndDrop
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScreenspaceDragDrop : MonoBehaviour
{

    public Camera mCamera;
 public Canvas canvas;
@smkplus
smkplus / RandomInsideRectTransform.md
Last active November 26, 2019 10:21
Random Inside RectTransform

Record_2019_11_26_13_42_34_194

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@smkplus
smkplus / PersianNames.md
Last active November 26, 2019 10:17
PersianNames

نام های فارسی برای استفاده در بازی

فاطمه زهرا زینب مریم‌ مبینا ستایش ریحانه نرگس‌

@smkplus
smkplus / 0 design-pattern.md
Created October 27, 2019 16:51 — forked from rain1024/0 design-pattern.md
design pattern

Design Pattern

  • name
  • intent
  • problem/motivation
  • solution
  • structure
  • code
  • consequences & trade-offs

Creational

@smkplus
smkplus / Colors
Created October 25, 2019 06:20 — forked from louisvalet/Colors
I heard you needed colors
using UnityEngine;
public static class Colors
{
public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 );
public static readonly Color Acajou = new Color32( 76, 47, 39, 255 );
public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 );
public static readonly Color Aero = new Color32( 124, 185, 232, 255 );
public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 );
public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 );