Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@aras-p
aras-p / CreateOneMeshFromWholeScene.cs
Last active December 26, 2023 05:41
Mesh.MeshData example
using System.Collections.Generic;
using System.Diagnostics;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using Unity.Profiling;
using UnityEngine;
using UnityEditor;
using UnityEngine.Rendering;
@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active May 8, 2025 16:14
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active May 14, 2025 06:23
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
@ayamflow
ayamflow / cheap-parabola.glsl
Last active October 3, 2024 09:46
Cheap parabola in GLSL
// Doesn't require pow()
// Not smoothed i.e. like a triangle function
float linearParabola(float x) {
return 1.0 - abs(x * 2.0 - 1.0);
}
// Slightly smoothed, no math function
float parabola(float x) {
return 4.0 * x * (1.0 - x);
@TobiasSekan
TobiasSekan / WPF_Error_HV_ContentAlignment.md
Last active November 28, 2024 15:20
[WPF] Fix for -> System.Windows.Data Error: 4 -> HorizontalContentAlignment and VerticalContentAlignment

Fix for debug output errors

Add the follow lines to the file App.xaml in your WPF application

    <!--
        Global fix for
        
        System.Windows.Data Error: 4 :
        Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''.
@StigOlavsen
StigOlavsen / arproxy.shader
Last active November 10, 2021 08:01
Unity shader for LWRP and AR Foundation, renders as transparent with occlusion and shadows. Put this on AR planes to get shadows and occlusion for 3D objects.
Shader "AR Proxy"
{
Properties
{
}
SubShader
{
Tags
{
@wybiral
wybiral / noscript-tracking.go
Last active October 28, 2024 23:01
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@JanHolger
JanHolger / Line.java
Last active May 4, 2019 17:48
A simple example of 2d raycasting using linear equation systems
package eu.bebendorf.raycasting;
public class Line {
Point a;
Point b;
public Line(Point a, Point b){
this.a = a;
this.b = b;
// Shader targeted for low end devices. Single Pass Forward Rendering.
Shader "Custom/Shadows Only"
{
// Keep properties of StandardSpecular shader for upgrade reasons.
Properties
{
_Alpha("Shadow Alpha", float) = 0.5
// Blending state