Skip to content

Instantly share code, notes, and snippets.

View JSandusky's full-sized avatar

Jonathan Sandusky JSandusky

  • Ohio, United States
View GitHub Profile
@JSandusky
JSandusky / LightShadow.cpp
Last active June 27, 2022 21:44
ShadowAtlas / Clustering file
//****************************************************************************
//
// File: LightShadow.cpp
// License: MIT
// Project: GLVU
//
//****************************************************************************
#include "LightShadow.h"
@JSandusky
JSandusky / TileCache.cpp
Created October 29, 2020 03:02
Shadowmap Caching
//****************************************************************************
//
// File: LightShadow.cpp
// License: MIT
// Project: GLVU
//
//****************************************************************************
#include "LightShadow.h"
@JSandusky
JSandusky / Notes.md
Last active July 11, 2020 03:19
Urho3D OpenVR

Stuff you have to fix to use it

  • I only scanned the first language in reading the JSON action manifest for names
    • you probably want all the names keyed on language
  • You probably need to remove the singlePass (not the same as singleTexture) code from it
  • Add SetElements to VertexBuffer, just set the elements and then call UpdateOffsets()
@JSandusky
JSandusky / VEZRenderScript.cpp
Created February 6, 2020 01:57
VEZ Renderer
#include "RenderScript.h"
#include "Buffer.h"
#include "Material.h"
#include "GraphicsDevice.h"
#include "Effect.h"
#include "LightShadow.h"
#include "Packing.h"
#include "Renderables.h"
#include "Renderer.h"
@JSandusky
JSandusky / DecalMesh.cs
Created December 8, 2019 18:18
MonoGame Decal Mesh
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace DelveLib
{
public class DecalMesh : IDisposable
{
#include "ImmediateRender.h"
#include "../Core/Context.h"
#include "../Graphics/VertexBuffer.h"
#include "../Graphics/Camera.h"
#include "../Graphics/Graphics.h"
#include "../Scene/Node.h"
#include "../Input/Input.h"
#include "../Graphics/View.h"
#include "../Graphics/Viewport.h"
@JSandusky
JSandusky / StructArray.cs
Created May 26, 2019 01:48
Crude swap+pop container
// Swap to pop array of structs
public class StructArray<T> where T : struct
{
public T[] items_;
public int Count { get; private set; }
public int Capacity { get; private set; }
public StructArray(int capacity)
{
Resize(capacity);
@JSandusky
JSandusky / dead.cs
Created March 23, 2019 01:48
Ubernoise
[Description("Uses noise derivatives to produce an extremely versatile noise")]
[PropertyData.PropertyIgnore("Interpolation")]
public partial class UberNoise : NoiseGenerator
{
float lacunarity_ = 2.0f;
int octaves_ = 3;
float gain_ = 0.5f;
float perturbFeatures_ = 0.2f;
float sharpness_ = 0.7f;
float amplify_ = 0.7f;
@JSandusky
JSandusky / MotionWheel.cpp
Created February 22, 2019 00:45
Motion Wheel ... WTFPL
MotionWheel::MotionWheel(Context* ctx) : Component(ctx),
traveledDistance_(0.0f),
lastPosition_(Vector3(M_INFINITY, M_INFINITY, M_INFINITY))
{
SubscribeToEvent(E_SCENEPOSTUPDATE, URHO3D_HANDLER(MotionWheel, OnUpdate));
}
MotionWheel::~MotionWheel()
{
@JSandusky
JSandusky / AnimProc.cpp
Created February 20, 2019 01:42
Keyframe extraction
#include "AnimProc.h"
#include "../Graphics/Animation.h"
#include "../IO/Log.h"
namespace Urho3D
{
/// Pulls out an interpolated keyframe from a track based on time.
/// The time value of the key will be set to the given time value, overwrite if undesired.