Skip to content

Commit

Permalink
deploy: ffe8b72
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Dec 7, 2024
0 parents commit 65b1132
Show file tree
Hide file tree
Showing 96 changed files with 16,011 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 10e2d44a5ec1686bfc8956b505b0aa62
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/autoexposure.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/censustransform.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/chromaticity.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/coordinatespaces.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/cpp.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/gaussianblur.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/index.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/logdepth.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/loops.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/opticalflow.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/outerralogdepth.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/pythonengine.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/reshadefx.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/shadermodel3.doctree
Binary file not shown.
Binary file added .doctrees/source/blog/sobel.doctree
Binary file not shown.
Binary file added .doctrees/source/social/index.doctree
Binary file not shown.
Binary file added .doctrees/source/social/instagram.doctree
Binary file not shown.
Binary file added .doctrees/source/social/project.doctree
Binary file not shown.
Binary file added .doctrees/source/social/youtube.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file not shown.
142 changes: 142 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@

Homepage
========

* :ref:`genindex`
* :ref:`search`

Portfolio
=========

.. toctree::
:glob:
:titlesonly:
:hidden:

source/*/index

Social Media Management
-----------------------

YouTube Channel
- Maintain a YouTube page for promotional and personal videos.
- Used a note-based template system through `Logseq <https://logseq.com/>`_ to streamline filling out information for video content.
- Engaged with the audience, when needed, and reflected feedback.

Facebook & Instagram
Created video content for promoting Project Reality's development highlights.

Video-Editing (2015 - Present)
------------------------------

Used various tools to create content for social media channels.

Editing and compositing video
- `Blender Video Sequence Editor (2015 -> 2020) <https://www.blender.org/features/video-editing/>`_
- `Davinci Resolve (2020 -> Preset) <https://www.blackmagicdesign.com/products/davinciresolve>`_

Media conversion
`FFmpeg <https://ffmpeg.org/>`_

Desktop recording
`OBS Studio <https://obsproject.com/>`_

Downloading media
`yt-dlp <https://github.com/yt-dlp/yt-dlp>`_

ReShade Shader Development (2020 - Present)
-------------------------------------------

Created `CShade <https://github.com/papadanku/CShade>`_, a library of image and video processing shaders.

CShade contains ported and in-house shaders, including:

Image Processing
^^^^^^^^^^^^^^^^

Ported AMD FidelityFX shaders
- `FidelityFX Lens <https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_lens/>`_
- `FidelityFX Contrast Adaptive Sharpening (CAS) <https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_contrast-adaptive-sharpening/>`_
- `FidelityFX Robust Contrast Adaptive Sharpening (RCAS) <https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_super-resolution-upscaler/#robust-contrast-adaptive-sharpening-rcas>`_

Common anti-aliasing
- `Fast Approximate Anti-Aliasing (FXAA) <https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing>`_
- `Directionally Localized Anti-Aliasing (DLAA) <http://www.and.intercon.ru/releases/talks/dlaagdc2011/>`_

Color conversions
- Chromaticity spaces
- Polar color spaces
- Grayscale

Convolutions
- Gaussian blur
- Edge detection

Local normalization
- Census transform
- Local contrast normalization

Video processing
^^^^^^^^^^^^^^^^

- Adaptive autoexposure
- Datamoshing
- Motion blur approximation
- Vector lines

Post Processing
^^^^^^^^^^^^^^^

- Backbuffer blending
- Dual-Kawase bloom
- Lens effect
- Letterbox
- Sharpening
- Vignetting

Photography & Videography (2021 - Present)
------------------------------------------

Used camera equipment to capture images and record video.

:Camera: Sony Alpha 6000
:Lens: Sony SELP 1650

Project Reality: Battlefield 2 (2021 - Present)
-----------------------------------------------

Shader Development
^^^^^^^^^^^^^^^^^^

Updated codebase to Shader Model 3.0
ASM and multiblending rewritten to programmable shaders.

Updated existing effects
- Post-processing suppression
- Thermal pixelation
- Water reflection

Implemented various graphics features
- Distance-based fog
- Valve Software's `Half-Lambert Lighting <https://advances.realtimerendering.com/s2006/Mitchell-ShadingInValvesSourceEngine.pdf>`_
- Per-pixel lighting
- Logarithmic depth buffering
- Off-terrain procedural sampling
- 16x anisotropic filtering support

Other Development
^^^^^^^^^^^^^^^^^

Python Implementations
- Randomized bot loadouts via Python
- Python-generated dynamic AI view distance setting

`RealityDocs <https://gitlab.com/realitymod/public/RealityDocs>`_
Transition the team's modding documentation into a static documentation site.

`RealityShaders <https://github.com/realitymod/RealityShaders>`_
Maintained an open-source repository for Project Reality's updated shaders.

`RealityUDL <https://gitlab.com/realitymod/public/realityudl>`_
Updated Project Reality's language support for Notepad++.

109 changes: 109 additions & 0 deletions _sources/source/blog/autoexposure.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

Temporal Auto-Exposure with Hardware Blending
=============================================

Some graphics pipelines compute auto-exposure like this:
:Textures:
#. Previous average brightness
#. Current average brightness
:Passes:
#. Store previously generated average brightness
#. Generates current average brightness
#. Smooth average brightnesses and compute auto-exposure

You can use hardware blending for auto-exposure:
:Textures:
#. Average brightnesses (previous + current)
:Passes:
#. Generate and smooth average brightnesses
#. Compute auto-exposure

Source Code
-----------

::

/*
Automatic exposure shader using hardware blending
*/

/*
Vertex shaders
*/

struct APP2VS
{
float4 HPos : POSITION;
float2 Tex0 : TEXCOORD0;
};

struct VS2PS
{
float4 HPos : POSITION;
float2 Tex0 : TEXCOORD0;
};

VS2PS VS_Quad(APP2VS Input)
{
VS2PS Output;
Output.HPos = Input.HPos;
Output.Tex0 = Input.Tex0;
return Output;
}

/*
Pixel shaders
---
AutoExposure(): https://knarkowicz.wordpress.com/2016/01/09/automatic-exposure/
*/

float3 GetAutoExposure(float3 Color, float2 Tex)
{
float LumaAverage = exp(tex2Dlod(SampleLumaTex, float4(Tex, 0.0, 99.0)).r);
float Ev100 = log2(LumaAverage * 100.0 / 12.5);
Ev100 -= _ManualBias; // optional manual bias
float Exposure = 1.0 / (1.2 * exp2(Ev100));
return Color * Exposure;
}

float4 PS_GenerateAverageLuma(VS2PS Input) : COLOR0
{
float4 Color = tex2D(SampleColorTex, Input.Tex0);
float3 Luma = max(Color.r, max(Color.g, Color.b));

// OutputColor0.rgb = Output the highest brightness out of red/green/blue component
// OutputColor0.a = Output the weight for temporal blending
float Delay = 1e-3 * _Frametime;
return float4(log(max(Luma.rgb, 1e-2)), saturate(Delay * _SmoothingSpeed));
}

float3 PS_Exposure(VS2PS Input) : COLOR0
{
float4 Color = tex2D(SampleColorTex, Input.Tex0);
return GetAutoExposure(Color.rgb, Input.Tex0);
}

technique AutoExposure
{
// Pass0: This shader renders to a texture that blends itself
// NOTE: Do not have another shader overwrite the texture
pass GenerateAverageLuma
{
// Use hardware blending
BlendEnable = TRUE;
BlendOp = ADD;
SrcBlend = SRCALPHA;
DestBlend = INVSRCALPHA;

VertexShader = VS_Quad;
PixelShader = PS_GenerateAverageLuma;
}

// Pass1: Get the texture generated from Pass0
// Do autoexposure shading here
pass ApplyAutoExposure
{
VertexShader = VS_Quad;
PixelShader = PS_Exposure;
}
}
48 changes: 48 additions & 0 deletions _sources/source/blog/censustransform.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

Census Transform in HLSL
========================

The census transform is a filter that represents the pixel's neighborhood relationship in a binary string. The binary string will be ``0000000`` if the center pixel is lesser than all of its neighbors. The binary string will be ``11111111`` if the center pixel is greater than or equal to all of its neighbors.

The filter does not depend on the image's actual intensity. As a result, the filter is robust to illumination.

Source Code
-----------

::

float GetGreyScale(float3 Color)
{
return max(max(Color.r, Color.g), Color.b);
}

float GetCensusTransform(sampler SampleImage, float2 Tex, float2 PixelSize)
{
float OutputColor = 0.0;
float4 ColumnTex[3];
ColumnTex[0] = Tex.xyyy + (float4(-1.0, +1.0, 0.0, -1.0) * PixelSize.xyyy);
ColumnTex[1] = Tex.xyyy + (float4( 0.0, +1.0, 0.0, -1.0) * PixelSize.xyyy);
ColumnTex[2] = Tex.xyyy + (float4(+1.0, +1.0, 0.0, -1.0) * PixelSize.xyyy);
const int Neighbors = 8;
float SampleNeighbor[Neighbors];
SampleNeighbor[0] = GetGreyScale(tex2D(SampleImage, ColumnTex[0].xy).rgb);
SampleNeighbor[1] = GetGreyScale(tex2D(SampleImage, ColumnTex[1].xy).rgb);
SampleNeighbor[2] = GetGreyScale(tex2D(SampleImage, ColumnTex[2].xy).rgb);
SampleNeighbor[3] = GetGreyScale(tex2D(SampleImage, ColumnTex[0].xz).rgb);
SampleNeighbor[4] = GetGreyScale(tex2D(SampleImage, ColumnTex[2].xz).rgb);
SampleNeighbor[5] = GetGreyScale(tex2D(SampleImage, ColumnTex[0].xw).rgb);
SampleNeighbor[6] = GetGreyScale(tex2D(SampleImage, ColumnTex[1].xw).rgb);
SampleNeighbor[7] = GetGreyScale(tex2D(SampleImage, ColumnTex[2].xw).rgb);
float CenterSample = GetGreyScale(tex2D(SampleImage, ColumnTex[1].xz).rgb);

// Generate 8-bit integer from the 8-pixel neighborhood
for(int i = 0; i < Neighbors; i++)
{
float Comparison = step(SampleNeighbor[i], CenterSample);
OutputColor += ldexp(Comparison, i);
}

// Convert the 8-bit integer to float, and average the results from each channel
return OutputColor * (1.0 / (exp2(8) - 1));
}
Loading

0 comments on commit 65b1132

Please sign in to comment.