Skip to content

Instantly share code, notes, and snippets.

View doppioslash's full-sized avatar

Claudia Doppioslash doppioslash

View GitHub Profile
@randomPoison
randomPoison / UnitySystem.cs
Created July 16, 2018 02:39
Comparison of writing a system with Unity's new ECS vs writing one in Amethyst.
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
using Unity.Transforms2D;
namespace TwoStickPureExample
{
public class PlayerMoveSystem : ComponentSystem
{
public struct Data
@breakin
breakin / gist:8df6d6c29369a1188e4e76df686024af
Created June 4, 2018 18:08
Intution importance sampling
Lets pretend we have a 1d function f defined on x in [0,1] that we don't quite know, but we have a feeling for the general shape.
For x<0.5 it is often small, below 0.1. For x>0.5 it is higher, often close to 1.0.
Now we can break f into two functions on A=[0,0.5] and B=[0.5,1] and integrate them one at the time.
The sum of the two will be the integral of the entire range.
How many samples should we take for each of those two?
A key observation here is that if we get the integral on A 5% wrong that will be way worse than if we get the integral on B 5% wrong. Why? This is due to the fact that the integral over A will be much smaller than the integral over B, so it will contribute less to the full integral. If we place more samples in A or B we must compensate since they will have a different N-factor that we
divide with when we do the averaging.
@meshula
meshula / 3d-formats.md
Last active September 2, 2025 18:33
3d file formats, last mile vs. interchange
@mottosso
mottosso / README.md
Last active March 14, 2021 20:17
Parallel Evaluation in Maya 2018+

An example of parallel evaluation in Maya 2018+

Scenes

  1. Independent hierarchies, with parent constraint

Usage

Files prefixed scene* generate nodes suitable for parallelism, profile* contain ways to measure performance. Each snippet of code is meant to be copy/pasted into the Script Editor and run.

@jmitchell89
jmitchell89 / CustomPBR.cs
Last active May 10, 2018 09:21
Unity Custom PBR shader node
// Custom PBR Sub Shader
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph;
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
@csherratt
csherratt / ui.md
Last active August 15, 2024 15:17
Flora's Rust UI ramblings

Rust UI Difficulties

I wanted to give a little bit of a discussion on all my thinking about why UI's are a tricky to get right in Rust. I want to try and differentiate this discussion because there are a number of decent UI frameworks that have been bound to Rust. This is great! I do not want to discourage any of their work, they are wonderful members of our community.

What this is about is how it would be possible to write a good UI framework

[package]
name = "amethyst"
version = "0.6.0"
authors = ["Eyal Kalderon <[email protected]>"]
description = "Data-oriented game engine written in Rust"
exclude = ["examples/*", "book/*"]
keywords = ["game", "engine", "sdk", "amethyst"]
categories = ["game-engines"]
documentation = "https://www.amethyst.rs/doc/master/doc/amethyst"
@kevashcraft
kevashcraft / K8s-DigitalOcean-CoreOS.md
Last active September 18, 2020 05:47
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@phi-lira
phi-lira / manifest_example_mac_fullpath
Last active April 6, 2020 12:12
Example of manifest pointing lightweight and core SRP packages to a local folder.
{
"dependencies": {
"com.unity.render-pipelines.core": "file:/users/felipe/Development/Graphics/com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:/users/felipe/Development/Graphics/com.unity.shadergraph",
"com.unity.render-pipelines.universal": "file:/users/felipe/Development/Graphics/com.unity.render-pipelines.universal",
}
}
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active August 18, 2025 21:39
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0