This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "../../../ASTL/Math/Vector.hpp" | |
#include "../../../ASTL/IO.hpp" | |
#include "../../../ASTL/Memory.hpp" | |
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "../../../External/stb_image.h" | |
#include "../../../External/stb_image_write.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -std=c++14 -O3 -mavx2 -march=native -msse4.2 -fno-rtti -fno-stack-protector -fno-exceptions -static-libstdc++ -static-libgcc RandomSSAOKernelGen.cpp -o RandomSSAOKernelGen.exe | |
#include <stdio.h> | |
// https://github.com/benanil/ASTL/blob/master/Random.hpp | |
#include "../ASTL/Random.hpp" | |
// https://github.com/benanil/ASTL/blob/master/Math/Vector.hpp | |
#include "../ASTL/Math/Vector.hpp" | |
Vector3f GenKernelVec(uint64_t xoro[2], float i, float kernelSize) | |
{ | |
Vector3f vec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// random noise | |
const vec2 Noise[32] = vec2[32]( | |
vec2(0.195175, 0.736741), | |
vec2(0.244343, -0.188865), | |
vec2(0.625741, 0.937121), | |
vec2(-0.050130, -0.450137), | |
vec2(-0.931756, 0.560139), | |
vec2(0.918269, 0.652424), | |
vec2(0.194104, -0.404106), | |
vec2(-0.936278, 0.118957), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jimenez et al. / Practical Real-Time Strategies for Accurate Indirect Occlusion | |
// https://www.activision.com/cdn/research/Practical_Real_Time_Strategies_for_Accurate_Indirect_Occlusion_NEW%20VERSION_COLOR.pdf | |
out float Result; | |
in vec2 texCoord; | |
uniform sampler2D depthMap; | |
uniform sampler2D normalTex; | |
uniform mat4 Proj; | |
uniform mat4 View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _MSC_VER | |
#include <intrin.h> // __movsb | |
#endif | |
#include <memory.h> | |
#include <stdint.h> | |
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum KeyboardKey_ | |
{ | |
Key_BACK = 0x08, | |
Key_TAB = 0x09, | |
Key_CLEAR = 0x0C, | |
Key_RETURN = 0x0D, | |
Key_SHIFT = 0x10, | |
Key_CONTROL = 0x11, | |
Key_MENU = 0x12, | |
Key_PAUSE = 0x13, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __cplusplus | |
extern "C" { | |
#endif | |
/***************************************************************** | |
* ASTL COMMON * | |
*****************************************************************/ | |
#ifndef ASTL_COMMON | |
#define ASTL_COMMON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you should have ASTL header only library inorder to use this | |
// you should compile this and place exe into the toolkit folder | |
#include "String.hpp" | |
#include "Array.hpp" | |
#include "IO.hpp" | |
bool IsRealClass(char* curr) | |
{ | |
// return false if template | |
if (curr[-1] == '<' || curr[-2] == 'm') // is enum class? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef AXGLOBALCONST | |
# if _MSC_VER | |
# define AXGLOBALCONST extern const __declspec(selectany) | |
# elif defined(__GNUC__) && !defined(__MINGW32__) | |
# define AXGLOBALCONST extern const __attribute__((weak)) | |
# else | |
# define AXGLOBALCONST | |
# endif | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include "Timer.hpp" | |
// #include <dlfcn.h> |
NewerOlder