Skip to content

Instantly share code, notes, and snippets.

View huhlig's full-sized avatar

Hans W. Uhlig huhlig

View GitHub Profile
@huhlig
huhlig / wgsl_noise.md
Created April 16, 2022 03:58 — forked from munrocket/wgsl_noise.md
WGSL Noise Algorithms

WGSL Noise Algorithms

Operator % has changed, probably current code need a fix

Value noise

fn rand(n: f32) -> f32 { return fract(sin(n) * 43758.5453123); }
fn noise(p: f32) -> f32 {
  let fl = floor(p);

Keybase proof

I hereby claim:

  • I am huhlig on github.
  • I am huhlig (https://keybase.io/huhlig) on keybase.
  • I have a public key ASDe6n3Cz9I2zQlswTJYlN4PCZ5lcnbpqTPscYYhP9jOvgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am huhlig on github.
* I am huhlig (https://keybase.io/huhlig) on keybase.
* I have a public key ASDsd6Mt5Rp2ZETtyze2lR9Cr-AJklluzhNIK9iR_0IfUAo
To claim this, I am signing this object:
@huhlig
huhlig / T0.md
Created February 25, 2016 14:26 — forked from graphitemaster/T0.md
Vulkan Tutorial

Tutorial 0

What is Vulkan

Vulkan is a low-overhead, cross-platform 3D graphics and compute API.

Vulkan targets

Vulkan targets high-performance realtime 3D graphics applications such as games and interactive media across multiple platforms providing higher performance and lower CPU usage.

{ 'AR': 'arm-linux-gnueabi-ar',
'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES',
'ARFLAGS': ['rc'],
'AS': 'arm-linux-gnueabi-as',
'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
'ASFLAGS': '-W',
'ASPPCOM': '$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES',
'ASPPFLAGS': '$ASFLAGS',
'BIBTEX': 'bibtex',
'BIBTEXCOM': 'cd ${TARGET.dir} && $BIBTEX $BIBTEXFLAGS ${SOURCE.filebase}',
package playground;
import java.util.ArrayList;
/**
*
*/
public class Playground {
public static ArrayList<ArrayList<Integer>> nextPermutation() {
// Generated from com\aol\hadoop\util\hce\HClean.g4 by ANTLR 4.0
package com.aol.hadoop.util.hce;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.tree.TerminalNode;
import org.antlr.v4.runtime.tree.ErrorNode;
public class HCleanBaseListener implements HCleanListener {
@Override public void enterTimeValue(HCleanParser.TimeValueContext ctx) { }
@huhlig
huhlig / gist:3667660
Created September 7, 2012 16:41
LLVM Builder. Just drop in Crontab
#!/bin/bash
BUILD=~/llvm
rm -Rf $BUILD
mkdir -p $BUILD/build
svn co http://llvm.org/svn/llvm-project/llvm/trunk $BUILD/src
svn co http://llvm.org/svn/llvm-project/cfe/trunk $BUILD/src/tools/clang
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk $BUILD/src/tools/clang/tools/extra
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk $BUILD/src/projects/compiler-rt
(cd $BUILD/build; ../src/configure --enable-optimized; make; make install)
@huhlig
huhlig / API
Created August 18, 2012 19:08
Starbound Server API
User Access/Account Control
* Account Creation
* Account Modification
* Account/User Banning/Unbanning
* Account information, notes, emails, accounting etc.
* Player Histories/Action Log(For fraud information)
Server Control/Statistics
* Server performance/statistics
* Server Reboot, Backup controls
* Server Failover swapping
testRandomizeImage(com.uhlisys.pixie.client.image.MultiFrameImageTest) Time elapsed: 0.046 sec <<< ERROR!
java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.IntegerInterleavedRaster.setDataElements(IntegerInterleavedRaster.java:301)
at java.awt.image.BufferedImage.setRGB(BufferedImage.java:988)
at com.uhlisys.pixie.client.image.MultiFrameImage.randomizeImage(MultiFrameImage.java:216)
at com.uhlisys.pixie.client.image.MultiFrameImage.randomizeImage(MultiFrameImage.java:201)
at com.uhlisys.pixie.client.image.MultiFrameImageTest.testRandomizeImage(MultiFrameImageTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)