Skip to content

Instantly share code, notes, and snippets.

//compilation
// kick the compilation
pCompiler->Compile(
pSource, // program text
wshader, // file name, mostly for error messages
shaderArgs.entryPoint, // entry point function
shaderArgs.type, // target profile
const_cast<LPCWSTR *>(finalFlags.data()), // compilation arguments
flagsCount, // number of compilation arguments
nullptr, 0, // name/value defines and their count
#pragma once
#include <limits>
namespace cpp_tools {
namespace numerical {
template <typename T> using singleVariableFunction = float (*)(T xValue);
struct ErrorReport {};
template <typename T>
@giordi91
giordi91 / GLSL-Noise.md
Created February 14, 2018 13:41 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
#include <bitset>
#include <iostream>
#ifdef MSVC
#include <intrin.h>
#endif
#ifdef CLANG
#include <x86intrin.h>
#endif
#include <cmath>
#include <cstdint>