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 / GpuInstancingStressTest.cs
Created January 10, 2025 10:39
GpuInstancingStressTest
using System.Collections.Generic;
using UnityEngine;
public class GpuInstancingStressTest : MonoBehaviour
{
[SerializeField]
private Mesh _mesh;
[SerializeField]
private Material _material;
@supertask
supertask / Illustrator_points_getter.js
Created September 19, 2024 10:01
Get selected position in pixel on Illustrator
var file = new File("~/Desktop/points.tsv"); // 出力先を指定
file.open("w");
var offsetX = 0;
var offsetY = -4271;
var doc = app.activeDocument;
var selection = doc.selection;
for (var i = selection.length - 1; i >= 0; i--) {
var item = selection[i];
public static class RosettaUiToolkitExtension
{
private static readonly List<Action> _afterBuildActions = new();
public static void Clear()
{
_afterBuildActions.Clear();
}
public static void Apply()
{
@supertask
supertask / Texture2DPNGExporter.cs
Created November 10, 2023 18:46
Texture2DPNGExporter for MetaTex
using UnityEngine;
using UnityEditor;
using System.IO;
public class Texture2DPNGExporter : MonoBehaviour
{
[MenuItem("Assets/Export Selected Textures to PNG")]
public static void SaveTexturesToPNG()
{
foreach (Object selectedObject in Selection.objects)
@supertask
supertask / OSCReceiver.pde
Created October 30, 2023 08:19
OSC Receiver by Processing
import oscP5.*;
import netP5.*;
OscP5 oscP5;
void setup() {
size(400, 400);
frameRate(25);
int port = 7474;
@supertask
supertask / ShowFloatInShader.hlsl
Created July 5, 2023 17:27
ShowFloatInShader
float3 ShowFloat(float2 uv, float val, int digits){
int a[210] =
{
1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,0,0,1,1,1, 0,0,0,0,0,0,
1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0,0,0,1,0,0, 0,1,0,0,0,0,
1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0,0,0,1,1,1, 1,1,1,1,1,1,
1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0,0,0,1,0,0, 0,1,0,0,0,0,
1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,0,0,1,1,1, 0,0,0,0,0,0
@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):