Skip to content

Commit

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

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

source/*/index

Portfolio
=========

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

Programming Languages
:General: C#, Python
:Markup: Markdown, reStructuredText
:Shaders: High Level Shading Language \(HLSL\), OpenGL Shading Language \(GLSL\)
:Utility: PowerShell
:Learning: Rust

Version Control
:Git: GitHub, GitLab
:Subversion: TortoiseSVN

Source Code Editors:
Notepad++, Visual Studio Code, PyCharm

Project Management
Redmine

Documentation Generators
MkDocs, Sphinx

Research and Development
Zotero, Logseq, draw.io

Other
PowerShell Terminal

Experience
^^^^^^^^^^

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

:Date: 2021 - Present

I am developer for the Project Reality: Battlefield 2 \(PR: BF2\).

Teamwork
- Communicated with other developers on new features.
- Helped new contributors get started with development.
- Posted development blogs to update the player community on the game's progress.

Repository Tool Usage
- Redmine to track changes and updates
- TortoiseSVN as version control

HLSL: Updates
- Rewrote shader codebase to Shader Model 3.0

- Ported shader assembly to programmable shaders
- Ported multitexture blending passess to programmable shaders

- Post-processing suppression
- Thermal pixelation
- 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 <https://advances.realtimerendering.com/s2006/Mitchell-ShadingInValvesSourceEngine.pdf>`_

Python: Implementations
- Python-generated dynamic AI view distance setting
- Reformatted codebase to fit closer to PEP\-8 standards
- Extended bot loadout to spawn with standard **and** alternate kits
- Randomized bot loadout kits via Python

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

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

: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, Vignette
:Color Conversions: Chromaticity Space, Polar Coordinate Space, Grayscale
:Convolutions: Gaussian Blur, Edge Detection, Sharpening
:Local Normalization: Census Transform, Local Contrast Normalization
:Motion Estimation: Hierarchical Lucas-Kanade Optical Flow
:Post-Processing: Backbuffer Blending, Letterbox
:Video Effects: Datamoshing, Motion Blur, Vector Lines

ReadShade
"""""""""

:Date: 2024 - Present

- Launched a documentation site for ReShade-related support using MkDocs.
- Collaborated with `Depth3D <https://blueskydefender.github.io/Depth3D/>`_ to create a documentation site.

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

:Date: 2023

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

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

- A VBO is a boxs with items
- A VAO is the box's manual on how to interpret its items

Day 2
- Code refactoring through polymorphism
- Creating a skybox
- Plane-based skyboxing

Day 3
- Creating smooth shadowmapping

Day 4+
- Using Sphinx to generate documentation for this project

----

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

Used various 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, media muxing

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

Video Production
- `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/>`_
- `fre:ac <https://www.freac.org/>`_

Project Reality: Battlefield 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:Date: 2023 - Present

: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

- Engaged with the community regarding feedback on the game.
- Created short video content for promoting Project Reality's development.

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

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

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

:Date: 2022 - Present
:YouTube: https://www.youtube.com/@papadanku
:Instagram: https://www.instagram.com/paulinyourwall/

- Maintained 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 and reflected feedback.
- Used YouTube Analytics to monitor audience data.
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 5616a07

Please sign in to comment.