Vulkan is a low-overhead, cross-platform 3D graphics and compute API.
Vulkan targets high-performance realtime 3D graphics applications such as games and interactive media across multiple platforms providing higher performance and lower CPU usage.
import bodyParser from 'body-parser'; | |
import express from 'express' | |
import * as _ from 'lodash'; | |
import * as IPFS from 'ipfs-client'; | |
import Queue from 'promise-queue'; | |
import xmlp from 'fast-xml-parser'; | |
import { readFileSync } from 'fs'; | |
const app = express() | |
const port = 3000 |
-- sfxr.lua | |
-- original by Tomas Pettersson, ported to Lua by nucular | |
-- ported to Solar2D by ponywolf | |
--[[ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#define STBI_ONLY_PNG | |
#define STBI_ONLY_JPEG | |
#define STBI_ONLY_BMP | |
#define STBI_ONLY_GIF | |
#include "stb_image.h" | |
#include "stb_image_write.h" |
local function shadow( width, height, size ) | |
local g = display.newGroup() | |
g.x, g.y = display.contentCenterX, display.contentCenterY | |
display.newRect( g, 0, 0, width+size, height+size ).fill = {1,1,1,0} | |
display.newRect( g, 0, 0, width, height ).fill = {0,0,0} | |
local c = display.capture( g ) | |
g = display.remove( g ) | |
#Corona planet shader v0.1#
###Instructions###
/* | |
These are the helper functions to store and to restore a 2D vector with a custom 16 floating point precision in a texture. | |
The 16 bit are used as follows: 1 bit is for the sign, 4 bits are used for the exponent, the remaining 11 bit are for the mantissa. | |
The exponent bias is asymmetric so that the maximum representable number is 2047 (and bigger numbers will be cut) | |
the accuracy from 1024 - 2047 is one integer | |
512-1023 it's 1/2 int | |
256-511 it's 1/4 int and so forth... | |
between 0 and 1/16 the accuracy is the highest with 1/2048 (which makes 1/32768 the minimum representable number) |
#ifdef _WIN32 | |
#include <malloc.h> | |
#endif | |
#include <cstdint> | |
#include <vector> | |
#include <iostream> | |
/** | |
* Allocator for aligned data. |