This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BPM Detector プロトタイピング実装レポート | |
## 概要 | |
RectorプロジェクトにおけるリアルタイムBPM検出機能のプロトタイプ実装を行った。当初は単純な低周波数レベル検出を使用していたが、スペクトラムフラックスベースのアプローチに移行し、より正確なBPM検出を実現した。 | |
## 実装の経緯 | |
### 1. 初期実装の問題点 | |
- `audioInput.LevelLow`(時間領域の低周波数フィルタ)を使用 | |
- BPMが150付近で張り付く問題が発生 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using VYaml.Annotations; | |
using VYaml.Serialization; | |
namespace Rector.Editor | |
{ | |
public static class VfxPropertyInfoReader | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is released under CC0 1.0 Universal (Public Domain Dedication). | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace Rector.UI.Components | |
{ | |
public sealed class FrameView : Graphic | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) 2024 shivaduke28 | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cid = () => Math.floor(Math.random() * 1e4); | |
const delay = (t, f, a) => { | |
let i = cid(); | |
let l = $.state.l ?? []; | |
l.push([i, t, f.name, a]); | |
$.state.l = l; | |
return i; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float3 SolidAngle(float3 p0, float3 p1, float3 p2) | |
{ | |
// edges | |
float cos01 = dot(p0, p1); | |
float cos12 = dot(p1, p2); | |
float cos20 = dot(p2, p0); | |
float sin01Inv = 1 / sqrt(1 - cos01 * cos01); | |
float sin12Inv = 1 / sqrt(1 - cos12 * cos12); | |
float sin20Inv = 1 / sqrt(1 - cos20 * cos20); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "AutoLight.cginc" | |
#if defined(POINT) | |
// 1/range*range for Unity's PointLight | |
float UnityPointLightRangeInvSqr() | |
{ | |
float3 unitLS = float3(unity_WorldToLight._m00, unity_WorldToLight._m01, unity_WorldToLight._m02); | |
return dot(unitLS, unitLS); | |
} | |
// https://forum.unity.com/threads/light-dist ance-in-shader.509306/#post-3326818 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEngine; | |
public static class LightingDataAssetReplacer | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Snell" | |
{ | |
Properties | |
{ | |
_WaterColor ("Water Color", Color) = (0.2, 0.8, 1, 1) | |
_Absorption("Absorption (sigma_a)", Color) = (0.3, 0.04, 0.01) | |
} | |
SubShader | |
{ | |
Tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UdonSharp; | |
using UnityEngine; | |
using VRC.SDKBase; | |
using VRC.Udon; | |
namespace TKMNY | |
{ | |
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)] | |
public class GlobalMaterialChanger : UdonSharpBehaviour |
NewerOlder