Skip to content

Instantly share code, notes, and snippets.

@CriDos
CriDos / greedyvoxelmeshing
Created September 27, 2019 06:32 — forked from Vercidium/greedyvoxelmeshing
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implemenetation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)
using System.Collections.Generic;
using HardDev.Engine.Experiment.Types;
using HardDev.Engine.Experiment.Voxel.BlockImpl;
using HardDev.Engine.Experiment.Voxel.Directions;
using UnityEngine;
namespace HardDev.Engine.Experiment.Voxel.ChunkImpl
{
public static class MergedFaceMeshBuilder
{
@CriDos
CriDos / launch.json
Last active November 15, 2024 03:08
Debugging .NET Projects in Cursor with netcoredbg: launch.json Example
{
"version": "0.2.0",
"configurations": [
{
"name": "Client (Debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-client-debug",
"program": "${workspaceFolder}/Build/Debug/HardClient.exe",
"args": [],