Skip to content

Instantly share code, notes, and snippets.

View whoisryosuke's full-sized avatar
Going deep with game development

Ryosuke whoisryosuke

Going deep with game development
View GitHub Profile
JiayinCao / tiny_fiber.h
Last active September 29, 2023 15:01
Tiny Fiber ( A razor thin cross platform fiber library )
View tiny_fiber.h
MIT License
Copyright (c) 2023 Jiayin Cao
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
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
h3r2tic / raymarch.hlsl
Last active August 29, 2023 23:55
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
View raymarch.hlsl
// Copyright (c) 2023 Tomasz Stachowiak
// This contribution is dual licensed under EITHER OF
// Apache License, Version 2.0, (
// MIT license (
// at your option.
#include "/inc/frame_constants.hlsl"
View spherewave.pde
// code updates are now there:
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code (by Kurt Spencer) in another tab is necessary
// --> code here :
// See the license information at the end of this file.
// View the rendered result at:
ChristopherBiscardi / .yabairc
Created September 11, 2022 21:08
What VSCode theme is that? youtube video
View .yabairc
# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
# when the config is executed during startup.
# for this to work you must configure sudo such that
# it will be able to run the command without password
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
RenaudRohlinger / GsapTicker.jsx
Created September 8, 2022 06:15
Synchronize gsap and r3f raf loop
View GsapTicker.jsx
import React, { useEffect } from 'react'
import gsap from 'gsap'
import { useFrame } from '@react-three/fiber'
// sync gsap raf to r3f raf
export const GsapTicker = () => {
const pg = React.useRef(0)
keijiro / disco.hlsl
Last active May 18, 2023 10:46
Disco mode shader for Windows Terminal
View disco.hlsl
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings
float Time;
float Scale;
float2 Resolution;
float4 Background;
HAliss / BezierTest.cs
Created July 25, 2022 09:16
Bezier visualization script for grass blade generation
View BezierTest.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BezierTest : MonoBehaviour {
public int numOfPoints;
public float height = 1;
mrxz / border-shader.frag
Created May 28, 2022 14:56
GLSL Shader that renders a border based on UV coordinates
View border-shader.frag
uniform vec3 color;
uniform vec3 borderColor;
uniform float borderWidth;
varying vec2 vUv;
// Technique based on Inigo Quilez's 'Analytic checkers pattern filtering'
float border(in vec2 uv, in vec2 ddx, in vec2 ddy) {
// filter kernel
vec2 w = max(abs(ddx), abs(ddy)) + 0.001;
bgolus / MatCapTechniques.shader
Created January 29, 2022 00:37
Showing multiple matcap techniques, including a proposed improved method that's no more expensive than the usual fix if you're starting with the world position and world normal.
View MatCapTechniques.shader
Shader "Unlit/MatCap Techniques"
[NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {}
[KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2
Tags { "RenderType"="Opaque" }