Skip to content

Instantly share code, notes, and snippets.

View supertask's full-sized avatar
🏖️
Chilling

Tasuku TAKAHASHI supertask

🏖️
Chilling
View GitHub Profile
@supertask
supertask / remap.cs
Created December 8, 2022 05:14
remap on C# / HLSL
float remap(float v, float minOld, float maxOld, float minNew, float maxNew) {
return minNew + (v-minOld) * (maxNew - minNew) / (maxOld-minOld);
}
@supertask
supertask / GVoxelizerTriangleFX
Created January 18, 2022 14:15
Keijiro's GVoxelizer triangle FX
// -- Triangle fx --
// Simple scattering animation
// We use smoothstep to make naturally damped linear motion.
// Q. Why don't you use 1-pow(1-param,2)?
// A. Smoothstep is cooler than it. Forget Newtonian physics.
float ss_param = smoothstep(0, 1, param);
// Random motion
float3 move = RandomVector(seed + 1) * ss_param * 0.5;
@supertask
supertask / my_career.md
Last active November 22, 2021 20:27
My career until entering teamLab's interactive team
Year Events
1992 Born in Kyoto, Japan
H.S. 3rd year Started JS
Univ. 1st year Started a computer science course.
Implemented a game in C
Univ. 2nd year Web design and creation
Univ. 3rd year Started 3DCG with Blender
Joined a distributed systems lab
Univ. 4th year Started Unity5
M.C. First year reated my own programming language.
Break (a year) Studied abroad in USA and Vietnam for a year
@supertask
supertask / shaderGraphFunctionGen
Last active September 26, 2021 14:57
Shader functions to ShaderGraph converter
#
# Shader functions to ShaderGraph converter
#
#
# How to use
# 1. Create the file "./functions.hlsl"
# 2. Execute `python shaderGraphFunctionGen.py`
# 3. Write the input file path "#inlude ./<functions>.hlsl" on "./output_functions.hlsl"
#
# INPUT (functions.hlsl):
@supertask
supertask / debugComputeBuffer.cs
Last active April 22, 2022 03:56
Debug compute buffer
//
// Debug Compute Buffer
// When you define a struct/class,
// please use override ToString(), public override string ToString() => $"MpmParticle(position={position}, velocity={velocity})";
//
// debugging range is startIndex <= x < endIndex
// example:
// Util.PrintBuffer<uint2>(this.particlesBuffer, 1024, 1027);
//
public static void PrintBuffer<T>(ComputeBuffer buffer, int startIndex, int endIndex) where T : struct
v2f vert_inflation(appdata v) {
v2f o;
v.vertex = LeapGetLateVertexPos(v.vertex, _isLeftHand); // late-latch support
o.vertex = UnityObjectToClipPos(v.vertex + float4(_InflationAmount * v.normal, 0));
return o;
}
fixed4 frag(v2f i) : SV_Target{
return _Color;
}
@supertask
supertask / Culling_Off.shader
Last active January 27, 2020 17:14
A part of Culling_Off.shader on Project North Star
void surf (Input IN, inout SurfaceOutput o) {
fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = 0.0;
o.Gloss = 0.0;
o.Alpha = 1.0;
o.Specular = 0.0;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
o.Emission = tex.rgb;
}
@supertask
supertask / check_status.py
Created June 28, 2019 02:54
Checking status codes of URL paths
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Requirements:
# Command:
# python3
# Python library(pip):
# requests
# urllib3
# File: checking_urls.txt
@supertask
supertask / tokyo_north_star_meetup_2.csv
Last active February 3, 2019 09:53
2nd Tokyo Project North Star Meetup
Time Content / Presenter
18:30 - Reception
19:00 - Venue and event guide
19:10 - 19:40 6DoF Project North Star using Windows MR by Yamaura(tw: @yamaulab) at exiii
19:40 - 20:10 Make AR HMD by Dabu(tw: @troll01234)
20:10 - 20:25 The first exhibition of a custum north star by Hirano, Iwanaka, Nakanishi(tw: @skckmdtk2m) at 1-10,inc
20:25 - 20:40 How to make apps, Discord community, Tips by Task(tw: @supertask_jp) at teamLab
20:40 - 22:00 Trial session and networking
@supertask
supertask / csv_exporter.gs
Last active June 15, 2023 04:22
スプレッドシートの複数のシートを複数のCSVにエクスポートするGASファイル.
/*
* スプレッドシートの複数のシートを複数のCSVにエクスポートする.
* マイドライブに置かれる.
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {