Skip to content

Instantly share code, notes, and snippets.

View Longor1996's full-sized avatar

Lars Longor K Longor1996

View GitHub Profile
@Longor1996
Longor1996 / MF_GridLines.T3D
Created November 28, 2022 15:04
Unreal Engine 5 - Material Function - GridLines
Begin Object Class=/Script/Engine.MaterialFunction Name="MF_GridLines"
Begin Object Class=/Script/Engine.Material Name="Material_0"
Begin Object Class=/Script/Engine.MaterialEditorOnlyData Name="Material_0EditorOnlyData"
End Object
End Object
Begin Object Class=/Script/Engine.MaterialExpressionMaterialFunctionCall Name="MaterialExpressionMaterialFunctionCall_14"
End Object
Begin Object Class=/Script/Engine.MaterialExpressionMax Name="MaterialExpressionMax_2"
End Object
Begin Object Class=/Script/Engine.MaterialExpressionFunctionOutput Name="MaterialExpressionFunctionOutput_1"
@Longor1996
Longor1996 / generator.py
Last active March 21, 2022 11:18
Merges multiple fonts and generates a multi-channel signed-distance-field font bitmap.
import re
import sys
import fontforge
print(f"MSDF Multi-Font Merger & Generator! Python {sys.version}")
merged = None
#merged = fontforge.font()
#merged.fontname = "merged"
#merged.encoding = "UnicodeFull"

Here are four command suggestions, changed to be distinct from each other and reasonably simple to implement.

The commands are specialized towards the view-direction and field-of-view of entities.


raycast

/raycast <distance> <accuracy> <chained command>

//Java port of:
//EASINGS :: https://github.com/prideout/par
//Robert Penner's easing functions.
//
//The MIT License
//Copyright (c) 2015 Philip Rideout
//Ported by:
//Lars Longor K
@Longor1996
Longor1996 / Voronoise.java
Created April 16, 2015 18:40
Voronoise Noise Function
/**
* Voronoise Function!
* Taken from: https://www.shadertoy.com/view/Xd23Dh
* Created by inigo quilez - iq/2014
* Ported by Lars Longor1996 K - 16.04.2015
* Version: 3
*
* @param xX sample position, x
* @param xY sample position, y
* @param u squareness
@Longor1996
Longor1996 / VertexArrayDrawer.java
Created May 30, 2014 21:35
The VertexArrayDrawer that is used in my Engine.
package de.jailong.engine.graphics;
import java.nio.FloatBuffer;
import java.util.Arrays;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL13;
public class VertexArrayDrawer implements IDrawer
@Longor1996
Longor1996 / PaintCanvas.java
Created May 25, 2014 18:17
Testomatiko: Testing a special CanvasRenderer for Paint.JAVA.
/*
WARNING: This code is:
- NOT commented.
- NOT fully tested.
- NOT safe for instant usage.
- A bit messy.
Also note that there is no exception/error/problem-checking at all.
Use at your own caution.
@Longor1996
Longor1996 / ColorFormats.md
Last active August 29, 2015 14:01
Paint.JAVA, File-Format TLGF

The following are different formats on how to ENCODE/DECODE a single image-layer/frame/node.

RGBA/8888

  • Binary Size: 32 Bit
  • Color Channels: Red, Green, Blue, Alpha
  • FormatID: 0

RGBA/5551

  • Binary Size: 16 Bit
  • Color Channels: Red, Green, Blue, Alphabit
@Longor1996
Longor1996 / gist:6425450
Last active September 7, 2020 17:15
Experimental DCPU-32 Specification
(formatting may be messed up!)
DCPU-MK2 Specification
Copyright 2013 Longor1996
Version 1.0
NOTE THAT THIS SPECIFICATION IS STILL PARTIALLY ERROR-PRONE!
THERE MAY BE FATAL LOGICAL MISTAKES IN IT!
READ AND USE WITH CAUTION AND TAKE EVERYTHING WITH A GRAIN OF SALT!