PSJK Blender Cartoon Render Pipeline Reproduction【2】- Character and Stage Shader

Preface The Shader section actually has quite a bit of existing work, such as the https://github.com/KH40-khoast40/Shadekai https://github.com/festivities/SekaiToon As for why you would rebuild your own wheels… There’s time. What other reason is there? Besides (knock on wood) the final realization is going to be in Blender… PV: Love, love, love Debugging Metal in Xcode even has resource dependencies rendered the Render Graph way… Cook thank you so much 🥲 The previous post didn’t look toward the work before SRP post-processing; here’s a straight shot at SRPBatcher Pass...

April 20, 2025 · 15 min · 3133 words · mos9527

Arithmetic Competition Notes - FFT/Polynomial/Number Theory Topics

Preface References mainly from https://cp-algorithms.com/algebra/fft.html, https://en.wikipedia.org/wiki/Discrete_Fourier_transform, https://oi.wiki/math/ poly/fft/ to take care of a certain OJ this article routines (except miscellaneous) C++ standard only needs 11; board portal,topic portal define The $DFT$ of a polynomial $A$ is the value of $A$ in each unit root $w_{n, k} = w_n^k = e^{\frac{2 k \pi i}{n}}$ $$ \begin{align} \text{DFT}(a_0, a_1, \dots, a_{n-1}) &= (y_0, y_1, \dots, y_{n-1}) \newline &= (A(w_{n, 0}), A(w_{n, 1}), \dots, A(w_{n, n-1})) \newline &= (A(w_n^0), A(w_n^1), \dots, A(w_n^{n-1})) \end{align} $$...

April 20, 2025 · 27 min · 5741 words · mos9527

PSJK Blender Cartoon Render Pipeline Revisited【3】- SDF face rendering implementation

Preface After the v2 facial model update the game finally introduces SDF facial shadows; the implementation is pretty much the same as most of the existing solutions on the market. This article shares one of my own ideas for correctly achieving this effect in Blender Note: Due to personal limitations errors are inevitable, It is highly recommended to read the following text as a preparatory knowledge: Secondary Character Cartoon Rendering - Face by MIZI Cartoon Rendering - 360 Degree Face SDF Lighting Scheme by Yu-ki016 Signed Distance Field by 欧克欧克 1....

April 20, 2025 · 8 min · 1514 words · mos9527

Arithmetic Competition Notes - Line Tree Topics

Note: segment_tree are accessed using 1-Index; vector is 0-Index in segment_tree::reset(vector&). 242E. XOR on Segment Interval binary change + lazy pass + binary trick You’ve got an array $a$, consisting of $n$ integers $a_1, a_2, …, a_n$. You are allowed to perform two operations on this array: Calculate the sum of current array elements on the segment $[l,r]$, that is, count value $a_l + a_{l+1} + … + a_{r}$ Apply the xor operation with a given number x to each array element on the segment $[l,r]$, that is, execute $a_l = a_l \oplus x, a_{l+1} = a_{l+1} \oplus x,…,a_r = a_r \oplus x$ This operation changes exactly $r - l + 1$ array elements....

April 20, 2025 · 17 min · 3531 words · mos9527

Arithmetic Notes - Hash Types Topic

1. Candy Rush TL;DR - string hash accelerated comparison + big hash trick 2023-2024 ACM-ICPC Latin American Regional Programming Contest Official solution (a math. puzzle):https://codeforces.com/gym/104736/attachments/download/22730/editorial.pdf After taking the frequency of occurrence of $C_i$ as a vector and doing a prefix sum, we can find that the frequency difference between valid intervals is $k \cdot 1_n$; the leveling complexity of the direct comparison is $O(nk\log{n})$, with $O(k)$ coming from the comparison itself...

April 20, 2025 · 6 min · 1142 words · mos9527

Computing Notes - GCD and Related Topics

691C. Row GCD You are given two positive integer sequences $a_1, \ldots, a_n$ and $b_1, \ldots, b_m$. For each $j = 1, \ldots, m$ find the greatest common divisor of $a_1 + b_j, \ldots, a_n + b_j$. Lemma: $gcd(x,y) = gcd(x,y-x)$ ** Lemma: ** can be extended to ** the array $gcd$ is numerically equal to the array difference $gcd$ **; the proof is obvious, omitted Note that the proposition does not hold on arrays and subarrays taken on their differences, as in 991F....

April 20, 2025 · 9 min · 1751 words · mos9527

PJSK Reverse Engineering - Note Archive

Preface Cutoff: 24/01/05 Revision: 24/09/26 Actually, analytics didn’t really take off until mostly after that…but couldn’t really find the time to write a post orz If you are interested in the latest knowledge or would like to participate in the research, please also refer to the following Repo and its Wiki: https://github.com/mos9527/sssekai https://github.com/mos9527/sssekai_blender_io Project SEKAI Reverse Engineering (1): File Decryption and Preliminary Static Analysis of APIs Analyzing Variant: ColorfulStage 2.4.1 (Google Play US) 1....

April 20, 2025 · 22 min · 4520 words · mos9527

Recreating PSJK's Toon Shader in Blender [1] - Preparations

Preface Same as the last time I closed the book It’s kind of a follow up, just in time to (re)start with the part of figuring out the cartoon rendering… *After all, this aspect of the old work left far more problems than it solved () There’s plenty of time before the rally, so let’s see how much I can write Version: Japanese 5.0.0 (Yakimori update) Equipment: Mac Mini M4 (2024) 1....

April 20, 2025 · 6 min · 1149 words · mos9527

Competitive Programming - Algorithm Templates And Problem Sets (C++)

Preface Reference primarily from [Introductory Classics for Algorithmic Competition: A Training Guide (https://cread.jd.com/read/startRead.action?bookId=30133704&readType=1)、OIWiki、CP Algorithms and other resources and multiple blogs and courses, authored under their own code breeze Note: Some implementations may use newer language features, so please modify them for use on older OJs; In principle, the code provided is compatible with compilers that comply with the Cpp20 standard and above. Header #include "bits/stdc++.h" using namespace std; #define PRED(T,X) [&](T const& lhs, T const& rhs) {return X;} typedef long long ll; typedef unsigned long long ull; typedef double lf; typedef long double llf; typedef __int128 i128; typedef unsigned __int128 ui128; typedef pair<ll, ll> II; typedef vector<ll> vec; template<size_t size> using arr = array<ll, size>; const static void fast_io() { ios_base::sync_with_stdio(false); cin....

April 20, 2025 · 29 min · 6120 words · mos9527

Competitive Programming - Algorithm Templates And Problem Sets (Python)

Preface The following Code is a direct port of Cpp version; please consider the former as the upstream and first reference source Python implementation, generally preferring to consider dynamic memory opening and hashing lookups (e.g. defaultdict instead of linear storage) Code section is not categorized, please make good use of Cpp version + Ctrl-F. Header from collections import defaultdict graph theory receiver gauge class graph(defaultdict): def __init__(self): super().__init__(list) def add_edge(self, u, v): self[u]....

April 20, 2025 · 2 min · 411 words · mos9527