π Problem Description
νμ¬ RedGPU μμ§μ WGSL μ
°μ΄λ μ½λ μ λ°μ linearDepth, hash, colorSpace λ³ν λ± κ³΅ν΅μ μΌλ‘ μ¬μ©λλ ν¨μλ€μ΄ μ¬λ¬ νμΌμ μ€λ³΅ μ μλμ΄ μκ±°λ, λ―ΈμΈνκ² λ€λ₯Έ λ²μ μΌλ‘ μ°μ¬ν΄ μμ΅λλ€. μ΄λ μ½λμ μΌκ΄μ±μ μ ν΄νκ³ μ μ§λ³΄μμ μ΄λ €μμ μ΄λνλ©°, λκ·λͺ¨ μμ€ν
(SkyAtmosphere, TAA λ±) ꡬν μ μμΉμ μ λ°λ λΆμΌμΉλ₯Ό μΌκΈ°ν©λλ€.
π― Goals
- μ€λ³΅ λ‘μ§ μ κ±°: ννΈνλ κ³΅ν΅ ν¨μλ€μ λ¨μΌ λΌμ΄λΈλ¬λ¦¬λ‘ ν΅ν©.
- μμΉ μμ μ± νμ€ν: κ²μ¦λ μ΅μ ν/μμ ν λ‘μ§(μ: Linear Depth)μ μμ§ μ μμ κ°μ μ μ©.
- μν€ν
μ² νλν: νμ
μΆλ‘ κ³Ό λ¬Έμνκ° μ©μ΄ν κ³μΈ΅μ κ΄λ¦¬ μμ€ν
ꡬμΆ.
π Proposed Changes
1. SystemCodeManager λμ
(Architecture Refactoring)
- Static Registry: κΈ°μ‘΄μ λ¨μ κ°μ²΄ λ°©μμ νκΈ°νκ³ , λͺ¨λ νλ‘νΌν°μ λ©μλκ°
staticμΌλ‘ μ μλ SystemCodeManager ν΄λμ€λ‘ μ νν©λλ€.
- Hierarchical Namespace:
SystemCodeManager.category.function ννμ κ³μΈ΅μ μ κ·Όμ μ§μνμ¬ μλ²½ν νμ
μΆλ‘ κ³Ό IDE μΈν
리μΌμ€ κΈ°λ₯μ μ 곡ν©λλ€.
- Implementation Example:
export default class SystemCodeManager {
static readonly math = {
hash11: hash11_wgsl,
hash33: hash33_wgsl,
} as const;
static readonly color = {
get_luminance: get_luminance_wgsl,
} as const;
}
2. ν΄λ ꡬ쑰 λ° μΈν΄λ£¨λ μμ€ν
κ°μ
- Atomic Chunk Structure: κ° ν¨μλ λλ©μΈλ³ ν΄λ λ΄μ κ°λ³ WGSL νμΌλ‘ κ΄λ¦¬λ©λλ€.
src/systemCodeManager/
βββ SystemCodeManager.ts
βββ shader/
βββ math/ (hash11.wgsl, hash12.wgsl...)
βββ color/ (rgb_to_ycocg.wgsl, get_luminance.wgsl...)
βββ depth/ (linearizeDepth.wgsl...)
- Dot-Notation Include:
#redgpu_include color.get_luminanceμ κ°μ΄ κ³μΈ΅ ꡬ쑰λ₯Ό λ°μν μ νκΈ°λ² μΈν΄λ£¨λλ₯Ό μ§μνλλ‘ μ μ²λ¦¬ λ‘μ§μ κ°μ ν©λλ€.
3. νμ€ν λμ ν보 (Priority Candidates)
- Math:
hash12, hash22, hash33, noise ν¨μ ν΅ν©.
- Color: νλ(Luminance) κ³μ νμ€ν (Rec. 709), YCoCg λ³ν λ‘μ§ ν΅ν©.
- Depth: μμ νλ
linearizeDepth μ μ© λ° κ³ μ λ° reconstructWorldPosition νμ€ν.
β
Acceptance Criteria
π Expected Impact
- μ
°μ΄λ μ½λλ κ°μ λ° μ μ§λ³΄μ νΈμμ± λΉμ½μ ν₯μ.
- μμ§ μ μμ μμΉ μ°μ° κ²°κ³Ό(κΉμ΄, νλ λ±) μΌκ΄μ± ν보.
- μ κ· κΈ°λ₯ κ°λ° μ κΈ°μ΄ κ·Έλν½μ€ μΈνλΌ νμ©λ μ κ³ .
Priority: π΄ High
Target Version: V4.1.0-Alpha
π Problem Description
νμ¬ RedGPU μμ§μ WGSL μ °μ΄λ μ½λ μ λ°μ
linearDepth,hash,colorSpaceλ³ν λ± κ³΅ν΅μ μΌλ‘ μ¬μ©λλ ν¨μλ€μ΄ μ¬λ¬ νμΌμ μ€λ³΅ μ μλμ΄ μκ±°λ, λ―ΈμΈνκ² λ€λ₯Έ λ²μ μΌλ‘ μ°μ¬ν΄ μμ΅λλ€. μ΄λ μ½λμ μΌκ΄μ±μ μ ν΄νκ³ μ μ§λ³΄μμ μ΄λ €μμ μ΄λνλ©°, λκ·λͺ¨ μμ€ν (SkyAtmosphere, TAA λ±) ꡬν μ μμΉμ μ λ°λ λΆμΌμΉλ₯Ό μΌκΈ°ν©λλ€.π― Goals
π Proposed Changes
1. SystemCodeManager λμ (Architecture Refactoring)
staticμΌλ‘ μ μλSystemCodeManagerν΄λμ€λ‘ μ νν©λλ€.SystemCodeManager.category.functionννμ κ³μΈ΅μ μ κ·Όμ μ§μνμ¬ μλ²½ν νμ μΆλ‘ κ³Ό IDE μΈν 리μΌμ€ κΈ°λ₯μ μ 곡ν©λλ€.2. ν΄λ ꡬ쑰 λ° μΈν΄λ£¨λ μμ€ν κ°μ
#redgpu_include color.get_luminanceμ κ°μ΄ κ³μΈ΅ ꡬ쑰λ₯Ό λ°μν μ νκΈ°λ² μΈν΄λ£¨λλ₯Ό μ§μνλλ‘ μ μ²λ¦¬ λ‘μ§μ κ°μ ν©λλ€.3. νμ€ν λμ ν보 (Priority Candidates)
hash12,hash22,hash33,noiseν¨μ ν΅ν©.linearizeDepthμ μ© λ° κ³ μ λ°reconstructWorldPositionνμ€ν.β Acceptance Criteria
SystemCodeManagerν΄λμ€ κ΅¬ν λ° κΈ°μ‘΄SystemCodeλ체.#redgpu_includeμ νκΈ°λ² μ§μ νμΈ.π Expected Impact
Priority: π΄ High
Target Version: V4.1.0-Alpha