Skip to content

Instantly share code, notes, and snippets.

View jherico's full-sized avatar
🖖
Peace and long life

Bradley Austin Davis jherico

🖖
Peace and long life
View GitHub Profile
{
"types" : {
"LightingModel" : [
{
"name" : "_UnlitEmissiveLightmapBackground",
"type" : "vec4"
},
{
"name" : "_ScatteringDiffuseSpecularAlbedo",
"type" : "vec4"
#version 450
struct LightingModel
{
vec4 _UnlitEmissiveLightmapBackground;
vec4 _ScatteringDiffuseSpecularAlbedo;
vec4 _AmbientDirectionalPointSpot;
vec4 _ShowContourObscuranceWireframe;
vec4 _Haze_spareyzw;
};
vk::ImageViewCreateInfo colorAttachmentView;
colorAttachmentView.format = colorFormat;
colorAttachmentView.subresourceRange.aspectMask = vk::ImageAspectFlagBits::eColor;
colorAttachmentView.subresourceRange.levelCount = 1;
colorAttachmentView.subresourceRange.layerCount = 1;
colorAttachmentView.viewType = vk::ImageViewType::e2D;
bdavis@MONOLITH8 ~/git
$ cd hifi
bdavis@MONOLITH8 ~/git/hifi (hmd_mono)
$ mkdir build2
bdavis@MONOLITH8 ~/git/hifi (hmd_mono)
$ cd build2/
bdavis@MONOLITH8 ~/git/hifi/build2 (hmd_mono)
#define GLEW_STATIC
#include <GL/glew.h>
#define OVR_OS_WIN32
#include <OVR_CAPI_GL.h>
#include <SDL.h>
#include <iostream>
#undef main
int _tmain() {
class ComboBoxPreference : public EditPreference {
Q_OBJECT
Q_PROPERTY(QStringList items READ getItems CONSTANT)
public:
ComboBoxPreference(const QString& category, const QString& name, Getter getter, Setter setter)
: EditPreference(category, name, getter, setter) { }
Type getType() { return ComboBox; }
const QStringList& getItems() { return _browseLabel; }
(function() {
PulseEntity.prototype = {
colors: [ "#F00", "#0F0", "#00F" ],
// Return the initial state.
initialState: function(stateWrapper) {
return {
// 64 bit absolute UTC timestamp of the current time
startTime: stateWrapper.now,
currentColor: 0
#include <map>
#include <list>
#include <QtScript/QScriptValue>
extern float currentTime();
namespace Controllers {
/*
Analog values:
LX, LY, RX, RY -> [-1, 1]
LT, RT -> [0, 1]
Buttons:
LS, RS, (analog stick press)
LB, RB, (shoulder buttons...)
DPadUp, DPadDown, DPadLeft, DPadRight, (aliases DU, DD, DL, DR)
X, Y, A, B,
Back, Start, Guide
const vec3 COLOR = vec3(24.0, 202.0, 230.0) / 255.0;
uniform float iWidth = 0.004;
uniform float iMiddle = 0.5;
uniform float iShell = 1.0;
uniform float iSpeed = 1.0;
vec4 getProceduralColor() {
float intensity = 0.0;
float time = iGlobalTime / 5.0 * iSpeed;