Skip to content

Instantly share code, notes, and snippets.

View smkplus's full-sized avatar
😍
Curios

Seyed Morteza Kamali smkplus

😍
Curios
View GitHub Profile
/*
Simple Demo for GLSL
www.lighthouse3d.com
*/
#include <stdio.h>
#include <stdlib.h>
@smkplus
smkplus / UnitySemiCircle.md
Last active January 15, 2019 13:11
Unity SemiCircle
@smkplus
smkplus / No Fucknig Lighting Unity.md
Last active January 22, 2019 19:09
Unlit Surface Shader

#pragma surface surf NoLighting


 fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten)
     {
         fixed4 c;
         c.rgb = s.Albedo; 
 c.a = s.Alpha;
@smkplus
smkplus / BackGround Website Shader.md
Created February 11, 2019 08:30
BackGround Website Shader
<background>

    <style>
    background {
    z-index : -9999;
    position: absolute;
    top : 0;
    left    : 0;
 width : 100%;
@smkplus
smkplus / RotationMatrixinshaderUnity.md
Created March 2, 2019 04:04
Rotation Matrix Unity
Shader "Unlit/Rotation"
{
	Properties
	{
		_Rotation("Rotation",Vector) = (0,0,0,0)
	}
	SubShader
	{
Shader "Custom/Cook-Torrance" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_BumpMap("Normal Map", 2D) = "bump" {}
_Metallic("Metallic", Range(0,1)) = 0.5
_MetallicTex("Metallic", 2D) = "white" {}
_Roughness("Roughness", Range(0.000000001,1)) = 0.5
_RoughnessTex("Roughness", 2D) = "white" {}
_Fresnel("Fresnel Value", Float) = 0.028
@smkplus
smkplus / SimpleInkPaint.shader
Created April 18, 2019 18:13
Unity Simple Ink Paint Shader
Shader "Unlit/SimpleInkPaint"
{
Properties{
_MainTex("MainTex", 2D) = "white" // メインテクスチャ
_Brush("Brush", 2D) = "white" // ブラシテクスチャ
_BrushScale("BrushScale", FLOAT) = 0.1 // ブラシサイズ
_ControlColor("ControlColor", VECTOR) = (0, 0, 0, 0) // ブラシの色
_PaintUV("Hit UV Position", VECTOR) = (0, 0, 0, 0) // ブラシで塗りたい位置
}
@smkplus
smkplus / SimpleInkPaint.cs
Created April 18, 2019 18:14
Unity Simple Ink Paint Script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//-------------------------------------
// simple ink paintスクリプト
// ColliderとRendererは必要
[RequireComponent(typeof(Renderer))]
[RequireComponent(typeof(Collider))]
public class SimpleInkPaint : MonoBehaviour {
@smkplus
smkplus / ColorfulPrintUnity.md
Created May 15, 2019 01:59
Colorful Debug.Log Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Console : Debug
{
public static void Log(string _message,Color _color){
ColorUtility.ToHtmlStringRGB(_color);
Debug.Log(string.Format("{1}",ColorUtility.ToHtmlStringRGB(_color),_message));
@smkplus
smkplus / TabasiUIManager.md
Created May 16, 2019 03:20
Tabasi UI Manager
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.EventSystems;

public class UIManager : MonoBehaviour {

	[System.Serializable]