Hello World / plɹoM ollǝH

Programmers Live in Vain

2019-05-01から1ヶ月間の記事一覧

pyside scoped signal blocking

IMPLEMENTS class ScopedBlockSignals: def __init__(self, obj): self.obj = obj def __enter__(self): self._recursiveSet(self.obj, True) def __exit__(self, _exc_type, _exc_val, _exc_tb): self._recursiveSet(self.obj, False) def _recursiveSet(se…

歪曲収差 glsl

void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord.xy / iResolution.xy; vec2 v = uv - vec2(0.5); float k1 = 1.5; float k2 = 0.5; float r1 = length(v); float r2 = r1 * (1.0 + k1*(r1 * r1) + k2*(r1 * r1 * r1 * r1))…