Skip to content

Instantly share code, notes, and snippets.

View jpvanoosten's full-sized avatar
🤓
Adding AFR to DX12 Framework.

Jeremiah van Oosten jpvanoosten

🤓
Adding AFR to DX12 Framework.
View GitHub Profile
@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active August 27, 2024 10:48
C++ Memory Management Resource List
@sagarpatel
sagarpatel / gist:376ed0b42211a65db0ebdb71b91b7617
Created May 25, 2018 12:02
Using surface shader with compute buffers
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Custom/CS_GeneratedMesh_VertexID_Surf"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness("Smoothness", Range(0,1)) = 0.5
_Metallic("Metallic", Range(0,1)) = 0.0
@joepie91
joepie91 / express-server-side-rendering.md
Last active July 26, 2024 09:56
Rendering pages server-side with Express (and Pug)

Terminology

  • View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
  • View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
  • HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
  • String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti