Skip to content

Instantly share code, notes, and snippets.

View ibreathebsb's full-sized avatar
:shipit:
learning graphics

Isaac Young ibreathebsb

:shipit:
learning graphics
View GitHub Profile
@ibreathebsb
ibreathebsb / unreal wold position uv node.txt
Created February 26, 2025 10:57
unreal custom node to compute uv
Begin Object Class=/Script/UnrealEd.MaterialGraphNode Name="MaterialGraphNode_19" ExportPath="/Script/UnrealEd.MaterialGraphNode'/Engine/Transient.PreviewMaterial_0:MaterialGraph_0.MaterialGraphNode_19'"
Begin Object Class=/Script/Engine.MaterialExpressionCustom Name="MaterialExpressionCustom_0" ExportPath="/Script/Engine.MaterialExpressionCustom'/Engine/Transient.PreviewMaterial_0:MaterialGraph_0.MaterialGraphNode_19.MaterialExpressionCustom_0'"
End Object
Begin Object Name="MaterialExpressionCustom_0" ExportPath="/Script/Engine.MaterialExpressionCustom'/Engine/Transient.PreviewMaterial_0:MaterialGraph_0.MaterialGraphNode_19.MaterialExpressionCustom_0'"
Code="\r\nfloat4 NDCPosition = LWCMultiply(MakeLWCVector4(LWCWorldPosition, 1.0f), ResolvedView.WorldToClip);\r\nNDCPosition.xy /= NDCPosition.w;\r\nfloat2 uv = NDCPosition.xy * float2(0.5f, -0.5f) + 0.5f;\r\nreturn uv;\r\n"
OutputType=CMOT_Float2
Description="ComputeUV"
Inputs(0)=(InputName="WorldPosition",Input=(Expression="
// Vertex shader source code
const vertexShaderSource = `#version 300 es
in vec4 position;
in vec2 texCoord;
out vec2 vTexCoord;
void main() {
gl_Position = position;
vTexCoord = texCoord;
}`;
@ibreathebsb
ibreathebsb / Build Protobuf for Unreal Engine 5 on Windows.md
Last active February 12, 2025 13:37
Build Protobuf for Unreal Engine 5 C++ 20 on Windows
@ibreathebsb
ibreathebsb / .ideavimrc
Last active September 24, 2024 08:19
.ideavimrc
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
""" Map leader to space ---------------------
let mapleader=" "
"" -- Suggested options --
// line intersection with WGS84 ellipsoid
FVector IntersectWGS84(FVector p0, FVector p1)
{
FVector result(0, 0, 0);
FVector center(0, 0, 0);
double a = 6378137.0;
double b = 6356752.314245;
double x0 = p0.X, y0 = p0.Y, z0 = p0.Z;
double x1 = p1.X, y1 = p1.Y, z1 = p1.Z;
double cx = center.X, cy = center.Y, cz = center.Z;
Name Author
Wouldn't It Be Nice The Beach Boys
A Good Man is Hard to Find Cass Daley
Ain't Misbehavin' Fats Waller
Answer to Drivin' Nails in My Coffin Jerry Irby
Anything Goes Cole Porter
Atom Bomb Baby The Five Stars
Bubbles in My Beer Bob Wills
Butcher Pete (Part 1) Roy Brown
@ibreathebsb
ibreathebsb / git.sh
Created November 30, 2022 06:38
export git log to csv
git log --after="YYYY-MM-DD" --author=A --pretty=format:%h,%an,%ae,%s > log.csv
@ibreathebsb
ibreathebsb / imgp.cpp
Created February 6, 2022 05:42
The imgp file loader
#include<iostream>
#include <fstream>
#include <map>
#include<vector>
#include <stb_image.h>
#include <stb_image_write.h>
#define IMGP_SIZE 1024 * 1024
@ibreathebsb
ibreathebsb / vimrc.txt
Last active September 19, 2021 11:02
.vimrc
set path+=**
set relativenumber
set nu
set hidden
set nowrap
set smartindent
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set incsearch
const path = require('path')
const fs = require('fs')
const parser = require('@babel/parser')
const traverse = require('@babel/traverse').default
const root = path.resolve(__dirname, 'src')
const res = []
const impl = (asbPath, fn) => {
const stats = fs.statSync(asbPath)