This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Screw/Silhouetted Diffuse" { | |
Properties { | |
_Color ("Main Color", Color) = (.5,.5,.5,1) | |
_FrontColor ("Front Color", Color) = (.5,.5,.5,1) | |
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |
_Outline ("Outline width", Range (0.0, 0.1)) = .005 | |
_MainTex ("Base (RGB)", 2D) = "white" { } | |
_Alpha ("Alpha", Range(0, 1)) = 1 | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class MeshModifier : MonoBehaviour { | |
const float EPSILON = 0.01f; | |
public void FindPoint (List<int> includes, Vector3[] vs, Vector3[] ns, Color[] cs) { | |
List<int> ps = new List<int>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Screw/Silhouetted Diffuse" { | |
Properties { | |
_Color ("Main Color", Color) = (.5,.5,.5,1) | |
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |
_Outline ("Outline width", Range (0.0, 0.03)) = .005 | |
_MainTex ("Base (RGB)", 2D) = "white" { } | |
_Alpha ("Alpha", Range(0, 1)) = 1 | |
} | |
CGINCLUDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Screw/Lit Color" { | |
Properties { | |
_Color ("Color", Color) = (1, 1, 1, 1) | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 | |
Pass { | |
CGPROGRAM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Screw/Alpha Outline" { | |
Properties { | |
_Color ("Main Color", Color) = (.5,.5,.5,1) | |
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |
_Outline ("Outline width", Range (0.0, 0.15)) = .005 | |
_OutlineOffset ("Outline Offset", Vector) = (0, 0, 0) | |
_MainTex ("Base (RGB)", 2D) = "white" { } | |
_Alpha ("Alpha", Float) = 1 | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.badlogicgames.plane; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.nio.FloatBuffer; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.Camera; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <openssl/md5.h> | |
string md5_evil(const char *message) { | |
unsigned char digest[MD5_DIGEST_LENGTH]; | |
MD5((unsigned char*)message, strlen(message), digest); | |
char md[2*MD5_DIGEST_LENGTH]; | |
for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { | |
sprintf(&md[i*2], "%02x", (unsigned int)digest[i]); | |
} | |
return string(md); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
/** | |
* You can run online at http://code.hackerearth.com/ | |
*/ | |
using namespace std; | |
const char *doubleString(const char *s){ | |
string ss = string(s) + string(s); |