최상위 10_Wiki/Topic_*였던 4개 카테고리 폴더를 10_Wiki/Topics/Topic_* 로 재배치.
콘텐츠 변경 없음(순수 폴더 이동) — Topics/ 하위 나머지 폴더는 이미 지난 커밋에서
전부 정리된 상태(잔존 항목은 에이전트 운영 상태 및 사용자가 보존을 요청한
업데이트0615/무제 3.canvas 뿐).
"매 rasterized fragment 마다 매 한 번 실행되어 final color 를 계산". 매 GPU pipeline (vertex → primitive assembly → rasterization → fragment → blending) 의 final programmable stage. 2026 시점 WebGPU + WGSL 가 WebGL2 + GLSL 의 후속, native 는 Metal MSL / HLSL SM 6.x / Vulkan SPIR-V.
매 핵심
매 input / output
Input: interpolated vertex output (UV, normal, world pos), uniforms, textures.
Output: 매 RGBA color (+ optional depth, MRT).
매 fragment ≠ pixel — 매 multi-sampling / overdraw 시 매 fragment 가 pixel 보다 많을 수 있다.
매 pipeline (rasterization)
Vertex shader → clip space.
Primitive assembly + clipping.
Rasterization → 매 fragment 생성.
Fragment shader → color.
Depth/stencil test + blending → framebuffer.
매 cost factor
Overdraw: 매 같은 pixel 이 여러 번 shaded.
Texture bandwidth: 매 sample count + filter.
ALU: 매 복잡한 BRDF, lighting loop.
Branch divergence: warp / wave 내 분기.
매 응용
PBR lighting (Cook-Torrance, GGX).
Post-processing (bloom, SSAO, FXAA, TAA).
Procedural texture / SDF.
Compute-like (pre-WebGPU 의 GPGPU hack).
💻 패턴
GLSL — basic textured + Lambert
// fragment.glsl (WebGL2 / GLSL ES 3.00)#version 300 esprecisionhighpfloat;invec2vUV;invec3vNormalW;invec3vPosW;uniformsampler2DuAlbedo;uniformvec3uLightDirW;outvec4outColor;voidmain(){vec3albedo=texture(uAlbedo,vUV).rgb;floatndl=max(dot(normalize(vNormalW),-normalize(uLightDirW)),0.0);outColor=vec4(albedo*(0.1+0.9*ndl),1.0);}