Skip to content

Instantly share code, notes, and snippets.

Avatar

Jakub Nei aeroson

View GitHub Profile
@aeroson
aeroson / Bounding26Dop.cpp
Last active Oct 5, 2021
Unreal Engine Bounding 26 DOP, Implements discrete oriented polytopes (DOP for short). Is an extension of bounding box, box has 6 directions and represents 6 distances, 26 DOP has 26 directions and represents 26 distances in those directions . Has similar API as UE4's FSphere, FBox and FBoxSphereBounds.
View Bounding26Dop.cpp
#include "Bounding26Dop.h"
#include "Math/UnrealMathUtility.h"
#include "Containers/UnrealString.h"
#include "Logging/LogMacros.h"
#include "Engine/Polys.h"
#include "DrawDebugHelpers.h"
#include "GenericPlatform/GenericPlatformMath.h"
#include "Async/ParallelFor.h"
#include "Serialization/StructuredArchiveFormatter.h"
@aeroson
aeroson / Screen Gray.shader
Last active Jun 1, 2020
Unity screen grayscale grabpass overlay shader for Unity's default quad mesh that can be put onto objects. Due to frustum culling it is only visible if the quad is in camera's view. If you want it to be visible more you can scale the the quad transform up to make the bounding box/sphere bigger. If you need this grayscale effect all the time, it …
View Screen Gray.shader
// Unity screen grayscale grabpass overlay shader for Unity's default quad mesh that can be put onto objects.
// Due to frustum culling it is only visible if the quad is in camera's view.
// If you want it to be visible more you can scale the the quad transform up to make the bounding box/sphere bigger.
// If you need this grayscale effect all the time, it would make more sense to instead use post processing shader/stack.
// license: Unlicense
Shader "FX/Screen Gray"
{
Properties
{
@aeroson
aeroson / wcc_lite_dumper.cs
Last active Jan 28, 2018
Added file/folder select windows so my friend can use it without the need to compile it manually, original source: https://gist.github.com/Traderain/de87d093a2ce72010efe32cdc590a4ab Compiled exe download: https://www.dropbox.com/s/x9dyogf9cj0pes3/wcc_lite_dumper.exe
View wcc_lite_dumper.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace wcclitedumper
{
class Program
View wcc_lite_dumper.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace wcclitedumper
{
class Program
View UnityCGShadersCheatSheet
Shader "Name" {
Properties {
name ("display name", Range (min, max)) = number
name ("display name", Float) = number
name ("display name", Int) = number
name ("display name", Color) = (number,number,number,number)
name ("display name", Vector) = (number,number,number,number)
@aeroson
aeroson / NeitriBaseExtensions.cs
Last active Aug 23, 2019
Collection of useful .NET extensions I've made over the years. I usually carry this to any project I work on.
View NeitriBaseExtensions.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
/// <summary>
/// Version 2017-07-08 (yyyy-MM-dd)
@aeroson
aeroson / NeitriUnityExtensions.cs
Created Jul 10, 2017
Collection of useful Unity3D extensions I've made over the years. I usually carry this to any project I work on.
View NeitriUnityExtensions.cs
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Version: 2017-07-06 (yyyy-MM-dd)
/// Many useful Unity3D extensions I've made over the years.
/// All in one class.
/// </summary>
public static class NeitriUnityExtensions
{
View ApplicationState.cs
using System;
using UnityEngine;
public static class ApplicationState
{
/// <summary>
/// Is editor either currently in play mode, or about to switch to it?
/// </summary>
public static bool isPlayingOrWillChangePlaymode { get { return Application.isEditor ? InternalEditorState.isPlayingOrWillChangePlaymode : true; } }
/// <summary>
View UX Guideliness.md

If user is able to type date in text, do show the date format somewhere, i.e.:

  • Start Date: <input type="text" name="start_date" placeholder="yyyy-MM-dd">
  • Start Date <small>yyy-MM-dd</small>: <input type="text" name="start_date">
  • Start Date: <input type="text" name="start_date" alt="yyy-MM-dd">
  • combination of (all) above