Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class button_idou : MonoBehaviour {
public GameObject player;
bool forwardmove;
bool backmove;
bool rightmove;
Shader "FX/mmat" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
#include "colors.inc"
#include "shapes.inc"
#include "woods.inc"
#include "textures.inc"
#include "stones.inc"
camera{
location <0,0.5,-4>
look_at <0,0,0>
}
//ライト設定 Area Lights
@bibinba
bibinba / webcam_for_material.cs
Last active October 27, 2017 11:03
webcamから取得した映像を任意のマテリアルのテクスチャにするコード。ThetaSにも使える
using UnityEngine;
using System.Collections;
public class webcam : MonoBehaviour {
public int Width = 1920;
public int Height = 1080;
public int FPS = 30;
public Material material;
WebCamTexture webcamTexture;