Skip to content

Instantly share code, notes, and snippets.

@ax3l
ax3l / CUDA_Compilers.md
Last active May 3, 2024 13:36
CUDA Compilers
@maximecharriere
maximecharriere / CGAL_installation_MSVC.md
Last active May 3, 2024 13:36
This tutorial will guide you through the different steps to install CGAL and its third party libraries

Installation of CGAL using MSVC on Windows

by @maximecharriere

This tutorial will guide you through the different steps to install CGAL and its third party libraries.
The purpose of this tutorial is that you don't have to spend weeks like me fighting to make them all work.

Feel free to comment on the gist comment section to make corrections or improvements !


@983
983 / frag.glsl
Created November 14, 2015 09:39
hsv rgb conversion glsl shader
// because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
@ManeFunction
ManeFunction / EasingFunctions.cs
Last active May 3, 2024 13:32 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
* Refactored by Mane Function
*
* The MIT License (MIT)
*
* Copyright (c) 2019-2023
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Maintainers:
nbp: freeciv_qt, freeciv_sdl2, freeciv, freeciv_qt, freeciv, freeciv_gtk, freeciv_gtk, freeciv_sdl2
@bradtraversy
bradtraversy / typescript-crash.ts
Last active May 3, 2024 13:32
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@runevision
runevision / Shadows.cginc
Last active May 3, 2024 13:32
Water Foam Particle Shader
UNITY_DECLARE_SHADOWMAP(_SunCascadedShadowMap);
float4 _SunCascadedShadowMap_TexelSize;
#define GET_CASCADE_WEIGHTS(wpos, z) getCascadeWeights_splitSpheres(wpos)
#define GET_SHADOW_FADE(wpos, z) getShadowFade_SplitSpheres(wpos)
#define GET_SHADOW_COORDINATES(wpos,cascadeWeights) getShadowCoord(wpos,cascadeWeights)
/**
* Gets the cascade weights based on the world position of the fragment and the poisitions of the split spheres for each cascade.
@runevision
runevision / BurstMethodTester.cs
Last active May 3, 2024 13:31
Using Unity Burst directly on methods without jobs - unofficial example code
using Unity.Burst;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
// This example code demonstrates using Unity Burst directly on a static method without jobs.
// Unity NativeArrays can't be used directly in Unity Burst methods (only in Burst jobs),
// so we have to pass pointers to arrays instead.
@cjddmut
cjddmut / EasingFunctions.cs
Last active May 3, 2024 13:31
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* 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