Skip to content

Instantly share code, notes, and snippets.

View FransBouma's full-sized avatar

Frans Bouma FransBouma

View GitHub Profile
/*
A pretty close port of Anisotropic Kuwahara Filtering on the GPU
source:
www.kyprianidis.com
Paper : http://www.kyprianidis.com/p/pg2009/jkyprian-pg2009.pdf
Preview App' : https://code.google.com/archive/p/gpuakf/downloads
Code : https://code.google.com/archive/p/gpuakf/source/default/source
Ported over to Reshade by Eideren
@FransBouma
FransBouma / AnselAlways.md
Last active June 7, 2023 19:08
How to remove the restrictions put on Ansel enable by a game

How to remove enable restrictions on Ansel in an Ansel-supporting game

How does enabling Ansel work

Ansel is an NVidia technology which enables a photomode with shaders in pre-defined games. A game doesn't support Ansel out of the box, it has to be setup for that, which is usually done by using the Ansel SDK. The Ansel SDK is available to people who register for an account with NVidia, and I don't have such an account, so all I provide here is what I figured out myself from what NVidia provided online and what I've seen in game code.

Ansel works with call-backs, which means the game has to register a function with Ansel which is then called when Ansel needs

@FransBouma
FransBouma / Session_Start migration.md
Created June 10, 2020 10:01
ASP.NET MVC global.asax Session_Start migration to ASP.NET Core 3 middleware

ASP.NET MVC Session_Start migration to ASP.NET Core 3 middleware

When you migrate your site from ASP.NET MVC on netfx to ASP.NET Core on .net core you might run into the problem what to do with the Session_Start method in global.asax: what's the equivalent in ASP.NET Core ?

Searching on the internet will likely make you end up on forum posts / stackoverflow posts telling you to 'write some middleware', but what does that mean? How to do that? If you feel as lost as I was, read on as this post is for you.

The request pipeline

@FransBouma
FransBouma / McFX.cfg
Last active September 24, 2021 13:53
The Witcher 3 Reshade files. I've enabled FXAA and SMAA. FXAA is for when the freecam is active as the game's DoF is then disabled. In-game it's best to disable it by default and only use SMAA. Alo use the in-game AA for the vegetation. For Reshade 1.0. If you're using 1.1, copy the settings of the sections I enabled to the v1.1 config files.
////----------//
///**GLOBAL**///
//----------////
//-Global Defines-//
//>McFX Suite General Settings<\\
//-Commentary:The McFX Suite contains various Depth of Field, ambient occlusion and vision changing shader.\nThose shader are derived from MasterEffect.
@FransBouma
FransBouma / gist:5e7031fe557df4b5b688
Created June 12, 2014 08:53
Do Contains calls in chunks. Original by Marc Gravell. Fixed for LLBLGen Pro
public static class QueryableChunked
{
public static IEnumerable<T> InRange<T, TValue>(this IQueryable<T> source,
System.Linq.Expressions.Expression<Func<T, TValue>> selector, int blockSize,
IEnumerable<TValue> values)
{
MethodInfo method = null;
foreach(MethodInfo tmp in typeof(Enumerable).GetMethods(BindingFlags.Public | BindingFlags.Static))
{
if(tmp.Name == "Contains" && tmp.IsGenericMethodDefinition && tmp.GetParameters().Length == 2)
@FransBouma
FransBouma / index.htm
Last active June 24, 2019 10:50
Starfield JS
<!DOCTYPE HTML>
<html>
<head>
<title>Simple full-browser star field effect in JS. By Otis / Infuse Project.</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
@FransBouma
FransBouma / Hitman_2016_Final_SmoothCamera_1.7.0.CT
Last active June 16, 2019 14:37
Hitman 2016 Final CT camera table, with smooth movement. For v1.7. By Jim2Point0 and myself.
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="21">
<CheatEntries>
<CheatEntry>
<ID>11022</ID>
<Description>"Camera system. Toggle: INS. Enable first"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>//----------------------------------------------------------
// Reworked Hitman 2016 cheat table with free camera / timestop / FoV
@FransBouma
FransBouma / MetroExodus_PMHacks_Otis.CT
Last active May 26, 2019 06:05
Metro Exodus photomode hacks. v1.0.1. Should work for steam version now too. The FoV override could lead to a timer issue inside the game engine so everything slows down to a crawl. I have no idea why.
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="28">
<CheatEntries>
<CheatEntry>
<ID>3</ID>
<Description>"Enable ansel everywhere"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>// Disable Ansel check
// By Otis_Inf
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Fluoro Duotone shader for Reshade.
// By Frans Bouma, aka Otis / Infuse Project (Otis_Inf)
// https://fransbouma.com
//
// This shader has been released under the following license:
//
// Copyright (c) 2018-2019 Frans Bouma
// All rights reserved.
@FransBouma
FransBouma / Kuwahara.fx
Last active November 29, 2018 17:03
Kuwahara filter implementation from: https://www.raywenderlich.com/100-unreal-engine-4-paint-filter-tutorial, for reshade
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// By Otis / Infuse Project
///////////////////////////////////////////////////////////////////
uniform int XRadius <
ui_type = "drag";
ui_min = 1; ui_max=16;
> = 2;