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 April 8, 2025 19:03
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 ([email protected])
// GLSL Approximation: Ruofei Du ([email protected])
@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];
@DomNomNom
DomNomNom / intersectAABB.glsl
Last active October 3, 2024 09:02
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 January 14, 2025 23:53
ペアプロの心得

ペアプロの心得

休憩をとる

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

謙虚になる

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