Skip to content

Instantly share code, notes, and snippets.

Shader "Unlit/EmissonTestShader"
{
Properties
{
[HDR]
_EmissionColor("Emission Color",Color) = (0,0,0,0)
}
SubShader
{
Tags { "RenderType"="Opaque" }
@mikhailov-work
mikhailov-work / turbo_colormap.glsl
Last active February 19, 2024 22:18
Turbo Colormap Polynomial Approximation in GLSL
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// Polynomial approximation in GLSL for the Turbo colormap
// Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f
// Authors:
// Colormap Design: Anton Mikhailov (mikhailov@google.com)
// GLSL Approximation: Ruofei Du (ruofei@google.com)
@s2kw
s2kw / AssetSave.cs
Created January 8, 2017 13:48
ScriptableObjectが保存されない問題回避用。
public class AssetSave : Editor
{
[MenuItem("File/Save Assets %&s")]
public static void SaveAssets()
{
var selectedObjects = UnityEditor.Selection.objects;
for (var i = 0; i < selectedObjects.Length; i++ )
{
var any = selectedObjects[i];
@azrsjp
azrsjp / dtm.markdown
Last active April 3, 2024 14:11
究極初心者がとりあえず聴けるレベルの曲を作れるようになるまで

究極初心者がとりあえず聴けるレベルの曲を作れるようになるまで

@azrsjp です。これは,DTM Advent Calendar 2015の19日目の記事です。

はじめに

本記事はDTM究極初心者が「こういうことをしたらとりあえず前よりは聞ける曲が完成させられるレベルになれた」という思い出話を綴ります。あくまで思い出話です。思い出話。今現在DTMに興味があるけど,何をしたらいいかわからない,__センスがないのでは…__と悩んでる方に,センスがなくても,まぁ形にはなるということを示し,希望を持って頂くために書きます。

この記事を読んで幸せになる人物像は以下のような方(昔の僕)

  • DTMでオリジナル曲を作りたい
  • DTMによる曲がどういう風にできているか大体の想像はつく(DAWというソフトがあり,ピアノロールで打ち込んで曲を表現する等)
@DomNomNom
DomNomNom / intersectAABB.glsl
Last active May 22, 2024 02:59
Ray-AABB (Axis Aligned Bounding Box) intersection.
// adapted from intersectCube in https://github.com/evanw/webgl-path-tracing/blob/master/webgl-path-tracing.js
// compute the near and far intersections of the cube (stored in the x and y components) using the slab method
// no intersection means vec.x > vec.y (really tNear > tFar)
vec2 intersectAABB(vec3 rayOrigin, vec3 rayDir, vec3 boxMin, vec3 boxMax) {
vec3 tMin = (boxMin - rayOrigin) / rayDir;
vec3 tMax = (boxMax - rayOrigin) / rayDir;
vec3 t1 = min(tMin, tMax);
vec3 t2 = max(tMin, tMax);
float tNear = max(max(t1.x, t1.y), t1.z);
@j5ik2o
j5ik2o / gist:2970973
Last active June 6, 2024 14:24
ペアプロの心得

ペアプロの心得

休憩をとる

1.定期的に休憩をとっていますか? ペアプログラミングは、精神的な体力を消耗します。定期的に休憩をとってリフレッシュすることがとても大切です。

謙虚になる

2.「色々な実装方針がある」という認識がありますか?