Skip to content

Instantly share code, notes, and snippets.

View JakubNei's full-sized avatar

Jakub Nei JakubNei

View GitHub Profile
@JakubNei
JakubNei / Bounding26Dop.cpp
Last active October 5, 2021 11:16
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.
#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"
@JakubNei
JakubNei / Screen Gray.shader
Last active January 17, 2023 21:43
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 …
// 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
{
@JakubNei
JakubNei / wcc_lite_dumper.cs
Last active January 28, 2018 21:02
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
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace wcclitedumper
{
class Program
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace wcclitedumper
{
class Program
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)
@JakubNei
JakubNei / NeitriBaseExtensions.cs
Last active August 23, 2019 08:35
Collection of useful .NET extensions I've made over the years. I usually carry this to any project I work on.
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)
@JakubNei
JakubNei / NeitriUnityExtensions.cs
Created July 10, 2017 02:05
Collection of useful Unity3D extensions I've made over the years. I usually carry this to any project I work on.
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
{
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>

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