Skip to content

Instantly share code, notes, and snippets.

View sotanmochi's full-sized avatar

Soichiro Sugimoto sotanmochi

View GitHub Profile
Shader "Unlit/TextureMultiplyBlending"
{
Properties
{
_BaseTex ("BaseTexture (RGBA)", 2D) = "white" {}
_MainTex ("MainTexture (RGBA)", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
o object.1
v 0 -1 0
v 0 0.3333333 0.942809
v 0.8164966 0.3333333 -0.4714045
v -0.8164966 0.3333333 -0.4714045
f 1 3 2
f 1 2 4
f 1 4 3
f 2 3 4
using UnityEngine;
public class RegularTetrahedronMesh : MonoBehaviour
{
[SerializeField] bool exportMesh = false;
[SerializeField] Material material;
void Start()
{
var filter = gameObject.AddComponent<MeshFilter>();
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(Transform))]
public class PolygonCounter : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();