Skip to content

Instantly share code, notes, and snippets.

View VirtuosoChris's full-sized avatar

Christopher Pugh VirtuosoChris

View GitHub Profile
@VirtuosoChris
VirtuosoChris / groupimages.py
Created June 20, 2023 23:16
groupimages.py
# by chatgpt
import argparse
import os
from skimage import img_as_float
from skimage.metrics import structural_similarity as ssim
from PIL import Image
import numpy as np
import shutil
@VirtuosoChris
VirtuosoChris / asdasd
Last active September 23, 2020 10:04
asdasdvbafasdasd
#version 440 core
precision highp float;
#define LOCAL_BLOCKSIZE 32
layout(local_size_x=LOCAL_BLOCKSIZE, local_size_y=LOCAL_BLOCKSIZE, local_size_z=1) in;
layout (binding = 0, rgba32f) uniform image2D imgIn;
layout (binding = 1, rgba32f) uniform image2D imgOut;
@VirtuosoChris
VirtuosoChris / asdasda.h
Created August 28, 2020 05:51
aksjdlakjsd
static int OriginalStrBuf()
{
static int idx = std::ios_base::xalloc();
return idx;
}
std::unordered_map<std::streambuf*, std::shared_ptr<std::streambuf>> replacementStrBufs;
#ifndef QuakeStyleConsole_h
#define QuakeStyleConsole_h
///
/// QuakeStyleConsole.h
/// Created by VirtuosoChris on 8/19/20.
///
/// This is the backend of a console interface for games, to help with debugging, cheats, etc
/// This is intended to be lightweight and efficient, rather than a general purpose scripting solution.
/// It is intended to perform two main functions: printing and setting variables as the game executes, and executing compiled C++ code from within the game.
@VirtuosoChris
VirtuosoChris / QuakeConsoleWidget.h
Created August 18, 2020 06:15
IMGUI Quake Console Widget Draft
//
// ConsoleWidget.h
//
// Created by VirtuosoChris on 8/17/20.
// Forked from Example Console code in IMGUI samples
// https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp
#ifndef ConsoleWidget_h
#define ConsoleWidget_h
@VirtuosoChris
VirtuosoChris / rendertargets.h
Created April 23, 2019 21:05
rendertargets.h
//
// RenderTargets.h
//
//
// Created by Chris Pugh on 2/2/16.
//
//
#ifndef RenderTargets_h
#define RenderTargets_h
@VirtuosoChris
VirtuosoChris / transformationslib.h
Created April 23, 2019 20:40
transformationslib.h
//#if !defined(TRANSFORMATIONS_H_INCLUDED) && !defined(VIRTUOSO_TRANSFORMATIONSLIB_IMPLEMENTATION)
#ifndef TRANSFORMATIONS_H_INCLUDED
#define TRANSFORMATIONS_H_INCLUDED
#include <Eigen/Eigen>
///\file These functions create transformation matrices using the Eigen library. What these particular transforms are and what their
/// arguments do should all hopefully be obvious. All angles are in radians and sane default arguments are provided where possible
///lookat()
@VirtuosoChris
VirtuosoChris / models.py
Created April 23, 2019 20:31
convert 3d model to header using assimp
#####
##### By Christopher Pugh
##### Copyright 2015 Virtuoso Engine, LLC
##### Public domain or equivalent license
#####
##### Basic asset to header script
##### Pulls vertices, normals, single texture coord channel
##### Triangulates meshes, pulls multiple meshes, puts everything in arrays in a namespace
##### first argument is input mesh file
##### Second optional argument is namespace name
@VirtuosoChris
VirtuosoChris / gltextureloader.h
Created April 23, 2019 20:28
gltextureloader.h
#ifndef VIRTUOSO_TEXTURE_LOADER_H_INCLUDED
#define VIRTUOSO_TEXTURE_LOADER_H_INCLUDED
#if !defined(GL_ALT_API_NAME)
#error "Missing dependency : include a glalt header before including TextureLoader.h"
#endif
#if !defined(GL_HPP)
#error "Missing dependency : include opengl.hpp before including TextureLoader.h"
#endif
#ifndef VIRTUOSO_GL_UTIL_H_INCLUDED
#define VIRTUOSO_GL_UTIL_H_INCLUDED
namespace Virtuoso
{
namespace GL
{
#ifdef GL_ALT_FUNDEF_CopyImageSubDataEXT
inline void copyMonoFrameToEyeBuffers(GLint monoTexture, GLint leftEyeTex, GLint rightEyeTex, GLint rtWidth, GLint rtHeight, unsigned int border=1, bool invalidateAfter=true)