Skip to content

Instantly share code, notes, and snippets.

View ufna's full-sized avatar
:octocat:
⊂(◉‿◉)つ

Vladimir Alyamkin ufna

:octocat:
⊂(◉‿◉)つ
View GitHub Profile
@ufna
ufna / Install-LinuxToolChain
Created November 19, 2015 11:06 — forked from megamorf/Install-LinuxToolChain
Powershell function to help setting up the Linux toolchain for UE4
function Install-LinuxToolChain {
<#
.SYNOPSIS
Downloads and installs the UE4 linux toolchain components.
.DESCRIPTION
Downloads the clang compiler to $ToolChainDestination and creates a
system-wide environment variable pointing to it.
Afterwards you have to regenerate the UE4 engine project files and
@ufna
ufna / build.js
Created October 10, 2018 08:04 — forked from norlin/UE5-Project.sublime-build
Build system for ue4 projects for Sublime Text 3
#!/usr/bin/env node
const { spawn } = require('child_process');
const path = require('path');
// Set the paths where your UE4 is located
const UE4Source = {
Win: 'D:/Work/github/UnrealEngine',
Mac: '/Users/Shared/Epic Games/UE_4.20'
};
@ufna
ufna / clang-format.sh
Last active October 25, 2019 11:21
clang-format CI check
#!/bin/bash
set -e
FIND=/usr/bin/find
GIT=/usr/bin/git
XARGS=/usr/bin/xargs
CLANG_FORMAT=/usr/bin/clang-format-6.0
DIRECTORY=%system.target.directory%
@ufna
ufna / server_restart.sh
Created October 9, 2019 19:17
Restart nodejs app with Jenkins and pm2
cd Extras/WebhookDemo
# replace secret key
jq -c '.store.secretKey = "'$MYSECRET'"' config.json > tmp.$$.json && mv tmp.$$.json config.json
cat config.json
# run node now
npm install
#pm2 delete all
#BUILD_ID=dontKillMe pm2 restart bin/www -f
@ufna
ufna / gauss_blur_uv.cpp
Last active October 13, 2019 10:23
Gaussian blur using indirect texture access (by UVs for mobile)
const float PI = 3.1415926535897932384626433832795;
const float DoublePI = 2.0 * PI;
const float CircleSize = 1.0;
const float SmoothPadding = 0.33;
const float Distance = 0.04;
const float DistanceSteps = 8.0;
const float RadialSteps = 8.0;
const float RadialOffset = 0.5;
@ufna
ufna / buffer_N.cpp
Created October 15, 2019 14:22
Kawase blur proof-of-concept
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// 0.5 - 1.5 - 2.5 - 3.5
KawaseSample(fragColor, fragCoord, 0.5);
}
@ufna
ufna / teamcity_2018_ubuntu_setup.md
Created October 18, 2019 19:03 — forked from brunojppb/teamcity_2018_ubuntu_setup.md
Setup TeamCity 2018 on Ubuntu

Setting up TeamCity 2018 on Ubuntu

Install Java 8

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
@ufna
ufna / buildstatus.md
Created November 1, 2019 10:54
Teamcity build widget github markdown example

statusIcon

@ufna
ufna / plexus.hlsl
Created January 21, 2020 12:36
Plexus Particles for Unreal Engine 4 (based on work of eclmist)
struct Functions
{
float distLine(float2 p, float2 a, float2 b) {
float2 ap = p - a;
float2 ab = b - a;
float aDotB = clamp(dot(ap, ab) / dot(ab, ab), 0.0, 1.0);
return length(ap - ab * aDotB);
}
float drawLine(float2 uv, float2 a, float2 b) {
@ufna
ufna / kawase.hlsl
Created January 23, 2020 11:53
Kawase Blur HLSL function for UE4
float3 BlurColor = Texture2DSample(Tex, TexSampler, UV + float2(Shift, Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(Shift, -Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(-Shift, Shift) / Resolution);
BlurColor += Texture2DSample(Tex, TexSampler, UV + float2(-Shift, -Shift) / Resolution);
BlurColor /= 4.0;
return BlurColor;