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
/**
* \brief Returns positional offset for a given point as a result of summing 4 gerstner waves
* \param positionWS point in world space
* \param wavelengths wavelength of each of the 4 waves
* \param amplitudes amplitudes of each of the 4 waves
* \param directions direction of each of the 4 waves (each row = one direction). MUST BE NORMALIZED!
* \param speed global speed multiplier. Individual wave speed depends on Wavelength
* \param steepness Gerstner wave 'Steepness' parameter. Modulates the horizontal offset of points
* \param normal returns the normal of given point.
* \return positional offset of the given point
@JiayinCao
JiayinCao / tiny_fiber.h
Last active May 6, 2024 21:19
Tiny Fiber ( A razor thin cross platform fiber library )
/*
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
h3r2tic / raymarch.hlsl
Last active May 9, 2024 12:04
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"

こんなアプリが欲しい

こういう「現実の背景をバックにアバターが踊ってる」動画を iPhoneとMocopiだけで指、表情込みで撮影できる アプリ image

どんなアプリを作れば良いの?

アバターの読み込み

  • VRoid Hubと連携してVRMモデルが読み込めると良い

トラッキング

  • 顔はARKitFaceのBlendShape
  • 指はMediaPipeのHand(後述の通りmocopiが無い場合はMediaPipeのBlazePoseでも良い)
// code updates are now there:
// https://github.com/Bleuje/processing-animations-code/blob/main/code/spherewave/spherewave.pde
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code (by Kurt Spencer) in another tab is necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
// See the license information at the end of this file.
// View the rendered result at: https://bleuje.com/gifanimationsite/single/spherewave/
@ChristopherBiscardi
ChristopherBiscardi / .yabairc
Created September 11, 2022 21:08
What VSCode theme is that? youtube video
# 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
RenaudRohlinger / GsapTicker.jsx
Created September 8, 2022 06:15
Synchronize gsap and r3f raf loop
import React, { useEffect } from 'react'
import gsap from 'gsap'
import { useFrame } from '@react-three/fiber'
// sync gsap raf to r3f raf
gsap.ticker.remove(gsap.updateRoot)
export const GsapTicker = () => {
const pg = React.useRef(0)
gsap.ticker.remove(gsap.updateRoot)
@keijiro
keijiro / disco.hlsl
Last active May 18, 2023 10:46
Disco mode shader for Windows Terminal
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings
{
float Time;
float Scale;
float2 Resolution;
float4 Background;
};
@HAliss
HAliss / BezierTest.cs
Created July 25, 2022 09:16
Bezier visualization script for grass blade generation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteAlways]
public class BezierTest : MonoBehaviour {
public int numOfPoints;
public float height = 1;
@mrxz
mrxz / border-shader.frag
Created May 28, 2022 14:56
GLSL Shader that renders a border based on UV coordinates
uniform vec3 color;
uniform vec3 borderColor;
uniform float borderWidth;
varying vec2 vUv;
// Technique based on Inigo Quilez's 'Analytic checkers pattern filtering'
// https://iquilezles.org/articles/checkerfiltering/
float border(in vec2 uv, in vec2 ddx, in vec2 ddy) {
// filter kernel
vec2 w = max(abs(ddx), abs(ddy)) + 0.001;