Skip to content

Instantly share code, notes, and snippets.

View KevinRoussel's full-sized avatar
💭
RedStudio co-funder

Kévin Roussel KevinRoussel

💭
RedStudio co-funder
View GitHub Profile
@alexanderameye
alexanderameye / CircularMenu.cs
Last active April 8, 2024 07:19
Circular menu for the Unity Editor
/*
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
using UnityEngine;
public class MeshBlit : MonoBehaviour
{
public RenderTexture rt;
public Mesh mesh;
public Material material;
public Vector3 meshPosition = new Vector3(0.5f, 0.5f, -1);
@ewandennis
ewandennis / UnityStencilMask.shader
Created January 2, 2018 20:42
A simple stencil buffer masking shader for Unity
Shader "Custom/StencilMask" {
Properties {
_StencilMask("Stencil mask", Int) = 0
}
SubShader {
Tags {
"RenderType" = "Opaque"
"Queue" = "Geometry-100"
}
@shivshank
shivshank / vox_to_obj_exporter.py
Last active December 31, 2023 01:12
Exports from MagicaVoxel VOX to OBJ. Can preserve all edges for easy editing in a program like Blender.
"""
This script is designed to export a mass amount of MagicaVoxel .vox files
to .obj. Unlike Magica's internal exporter, this exporter preserves the
voxel vertices for easy manipulating in a 3d modeling program like Blender.
Various meshing algorithms are included (or to be included). MagicaVoxel
uses monotone triangulation (I think). The algorithms that will (or do)
appear in this script will use methods to potentially reduce rendering
artifacts that could be introduced by triangulation of this nature.