Skip to content

Instantly share code, notes, and snippets.

View akella's full-sized avatar
🏠
Working from home

Yuri Artiukh akella

🏠
Working from home
View GitHub Profile
@akella
akella / setup.md
Last active July 4, 2026 22:27
My Setup
@akella
akella / curl.glsl
Created November 5, 2023 09:03
curl.glsl
#define PI 3.1415926538
const float EPS = 0.001;
vec4 mod289(vec4 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float mod289(float x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec4 permute(vec4 x) {
@akella
akella / break-word.sass
Last active March 30, 2026 04:05
Breaking long words
=force-new-lines-for-long-words
-ms-word-break: break-all
word-break: break-all
word-break: break-word
-webkit-hyphens: auto
-moz-hyphens: auto
hyphens: auto
@akella
akella / bokeh.js
Created March 1, 2026 08:33
microsoft.ai
const GOLDEN_ANGLE = float(2.39996323);
const BOKEH_ITERATIONS = 50;
const PI2 = float(Math.PI * 2);
const uResolution = vec2(uniform(this.width), uniform(this.height));
let blueNoiseTexture = new THREE.TextureLoader().load(bluenoise);
blueNoiseTexture.colorSpace = THREE.LinearSRGBColorSpace;
blueNoiseTexture.minFilter = THREE.NearestFilter;
blueNoiseTexture.magFilter = THREE.NearestFilter;
blueNoiseTexture.wrapS = THREE.RepeatWrapping;
@akella
akella / setup.md
Last active December 26, 2025 12:03
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@akella
akella / simplex-tsl.js
Created December 5, 2024 20:16
simplex TSL noise
// from https://mameson.com/experiment/glsl/proven_2/proven_2.html
function mm_hash12( iw){ //★ x, y とも 0〜2,000,000 の整数入力。
const w = iw.mul( 0.000303) //★ 入力の 6 ケタとも活かす。
.add( fract( iw.mul( 0.707))); //★ 入力の上位ケタは捨てて下位ケタ拾い上げ。
const a = w.x.add( w.y.mul( 0.3)); //★ 斜めにする。
//★ 最近気に入っているフェイク sin。
a.assign( fract( a));
a.assign( a.sub( a.mul( a)));
@akella
akella / facebook-normalize-wheel.js
Created November 25, 2017 22:49
Facebook attempt at normalizing wheel event
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule normalizeWheel
* @typechecks
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@akella
akella / saturation.js
Last active August 29, 2025 21:16
TSL snippets
const sat = Fn(([rgb,intensity])=> {
const L = vec3(0.2125, 0.7154, 0.0721);
const grayscale = vec3(dot(rgb, L));
return mix(grayscale, rgb, intensity);
});
@akella
akella / oklab.glsl
Created October 8, 2023 07:55
oklab.glsl
float fixedpow(float a, float x)
{
return pow(abs(a), x) * sign(a);
}
float cbrt(float a)
{
return fixedpow(a, 0.3333333333);
}