Skip to content

Commit

Permalink
deploy: f193227
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Dec 9, 2024
0 parents commit a5e4621
Show file tree
Hide file tree
Showing 96 changed files with 16,132 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.
200 changes: 200 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@

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

source/*/index

Resume
======

Programming
-----------

Tools
^^^^^

I utilize open-source software for development.

- **Programming languages:** C#, Python, Markdown, reStructuredText, HLSL, GLSL, PowerShell
- **Version control:** Git \(GitHub, GitLab\) and Subversion \(TortoiseSVN\)
- **Source code editors:** Notepad++, Visual Studio Code, and PyCharm
- **Project management:** Redmine
- **Documentation generators:** MkDocs and Sphinx
- **Research and development:** Zotero, Logseq, and draw.io
- **Other:** PowerShell Terminal
- **Learning:** Rust

Experience
^^^^^^^^^^

Project Reality: Battlefield 2
""""""""""""""""""""""""""""""

:Date: 2021 - Present
:Link: https://www.realitymod.com/

As a developer for Project Reality: Battlefield 2, I:

- Collaborated with other developers on new features
- Assisted new contributors with development
- Published development blogs to update the player community on game progress
- Utilized Redmine for tracking changes and updates, and TortoiseSVN for version control
- Implemented various features, including:

HLSL updates
- Rewrote shader codebase to Shader Model 3.0
- Ported shader assembly to programmable shaders
- Rewrote post-processing suppression, thermal pixelation, and water reflection

HLSL implementations
- 16x anisotropic filtering support
- Complete per-pixel lighting
- Distance-based fog
- Logarithmic depth buffering
- Offmap terrain procedural sampling
- Valve Software's Half-Lambert Lighting

Python implementations
- Python-generated dynamic AI view distance setting
- Reformatted codebase for PEP-8 standards
- Extended bot loadout to spawn with standard and alternate kits
- Optional randomized bot loadout kits via Python

- Maintained and contributed to several related projects, including:

`RealityDocs <https://gitlab.com/realitymod/public/RealityDocs>`_
Ported 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++

Projects
^^^^^^^^

ReShade Shaders
"""""""""""""""

:Date: 2020 - Present
:Link: https://github.com/papadanku/CShade

I created **CShade**, a library of image and video processing shaders, which includes:

- **AMD FidelityFX ports**

- `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>`_

- **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/>`_

- **Camera effects:** Autoexposure, Dual-Kawase bloom, lens effect, and vignette.
- **Color conversions:** Chromaticity space, polar coordinate space, and grayscale.
- **Local Normalization:** Census Transform and Local Contrast Normalization.
- **Convolutions:** Gaussian blur, edge detection, and sharpening.
- **Motion estimation:** Hierarchical Lucas-Kanade optical flow.
- **Post-processing:** Backbuffer blending and letterbox.
- **Video effects:** Datamoshing, motion blur, and vector lines.

ReadShade
"""""""""

:Date: 2024 - Present
:Link: https://github.com/papadanku/ReadShade

I launched a documentation site for ReShade-related support using MkDocs and collaborated with Depth3D to create a documentation site.

PythonicEngine
""""""""""""""

:Date: 2023
:Link: https://github.com/papadanku/PythonicEngine

I spent a weekend in 2023 following `Coder Space's Python 3D Engine Series <https://youtube.com/playlist?list=PLi77irUVkDav8GLrZSVZiPPHvVa-RjJ-o>`_ and learned about:

- Adding geometry, basic lighting, and a camera to a scene
- Best practices: mipmapping, gamma-correction, and code refactoring
- Fundamentals of the OpenGL pipeline
- Using PyGame, ModernGL, and PyGLM to make an engine
- Differences between Vertex Buffer Objects \(VBOs\) and Vertex Array Objects \(VAOs\)

I also learned about code refactoring through polymorphism, creating a skybox, plane-based skyboxing, and smooth shadowmapping, and used Sphinx to generate documentation for the project.

----

Content Creation, Social Media Management
-----------------------------------------

I utilized a range of hardware and software to create content for social media channels.

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

Software
`OBS Studio <https://obsproject.com/>`_
Desktop recording and media muxing

`yt-dlp <https://github.com/yt-dlp/yt-dlp>`_
Media downloading and conversion

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

Media Conversion
- `FFmpeg <https://ffmpeg.org/>`_
- `fre:ac <https://www.freac.org/>`_

Project Reality
^^^^^^^^^^^^^^^

:Date: 2023 - Present
:Link: https://www.realitymod.com/

As a social media manager for Project Reality: Battlefield 2, I:

- Engaged with the community to gather feedback on the game
- Created short video content to promote Project Reality's development, including:

Short 1
- **Facebook:** https://www.facebook.com/realitymod/videos/2024-update-reveal-1-shorts/355546420818308/
- **Instagram:** https://www.instagram.com/projectrealitymod/reel/C4nDvMzMEBM/
- **YouTube:** https://www.youtube.com/shorts/CtcVkypMKLE

Short 2
- **Facebook:** https://www.facebook.com/realitymod/videos/2024-update-reveal-2-shorts/1612029272964840/
- **Instagram:** https://www.instagram.com/projectrealitymod/reel/C5YIZiNBViH/
- **YouTube:** https://www.youtube.com/shorts/1mmFA_XHZg0


.. seealso::

- **Discord:** https://discord.com/servers/project-reality-190090455973756928
- **Facebook:** https://www.facebook.com/realitymod
- **Instagram:** https://www.instagram.com/projectrealitymod/
- **YouTube:** https://www.youtube.com/@ProjectRealityMod

Personal Social Media
^^^^^^^^^^^^^^^^^^^^^

:Date: 2022 - Present

As a personal social media manager, I:

- Maintained a YouTube page for promotional and personal videos
- Utilized a note-based template system through `Logseq <https://logseq.com/>`_ to streamline content creation
- Engaged with the audience and reflected feedback
- Monitored audience data using YouTube Analytics

.. seealso::

- **YouTube:** https://www.youtube.com/@papadanku
- **Instagram:** https://www.instagram.com/paulinyourwall/
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 a5e4621

Please sign in to comment.