Rendering Spec · Rev. 2026

Pawn Type Spec

Main Thread Read-Only / Worker Thread Write-Only 타입. Owner로 Transform을 하나 가지며, shape에 따라 내부 처리가 암시적으로 분기합니다.

3Subtypes
128SIMD Target (bits)
2Thread Roles
scroll
01 — Overview

Pawn 타입 개요

Pawn은 공간 오브젝트의 런타임 표현입니다. 스레드 접근 역할이 명확히 분리되어 있으며, 각 서브타입의 shape은 암시적으로 내부 처리를 분기합니다. 명시된 스펙 이외의 동작은 최적화·확장·수정 등의 이유로 변경될 수 있습니다.

Main Thread
Read Only — 메인 스레드에서 Pawn 데이터를 읽기만 합니다.
Worker Thread
Write Only — 워커 스레드에서 Pawn 데이터를 씁니다.
Owner
모든 Pawn은 Transform을 하나 가져야 합니다.
Shape Dispatch
shape 서브타입에 따라 내부 처리가 암시적으로 분기합니다.
TODO  entity 1개가 128bit을 넘어가지 않아야 SIMD 최적화됩니다. 현재 PawnCapsule(256bit)과 PawnCube(224bit)는 이 제약을 초과합니다.
02 — Subtypes

서브타입 정의

각 서브타입의 struct 레이아웃과 비트 크기를 명세합니다. SIMD 최적화 기준선은 128bit(16 bytes)입니다.

PawnSphere
20 bytes = 160 bits  ·  inner sphere: 16 bytes = 128 bits
160 bit Read / Write
PawnSphere — 20 bytes
// 20 bytes (=160bits)
public struct PawnSphere
{
    public sphere   shape;
    public Features features;
}
sphere — 16 bytes
// 16 bytes (=128bits)
struct sphere
{
    public float3 center;
    public float  radius;
}
비트 레이아웃
float3 center (96b)
radius (32b)
feat
= 160 bit
sphere 필드(128bit)는 SIMD 기준선 충족
PawnCube
28 bytes = 224 bits  ·  inner cube: 24 bytes = 192 bits
224 bit Read / Write
PawnCube — 28 bytes
// 28 bytes (=224bits)
public struct PawnCube
{
    public cube     shape;
    public Features features;
}
cube — 24 bytes
// 24 bytes (=192bits)
struct cube
{
    public float3 center;
    public float3 extents;
}
비트 레이아웃
float3 center (96b)
float3 extents (96b)
feat
= 224 bit
128bit 기준선 초과 — SIMD TODO 대상
PawnCapsule
32 bytes = 256 bits  ·  inner capsule: 28 bytes = 224 bits
256 bit Read / Write
PawnCapsule — 32 bytes
// 32 bytes (=256bits)
public struct PawnCapsule
{
    public capsule  shape;
    public Features features;
}
capsule — 28 bytes
// 28 bytes (=224bits)
struct capsule
{
    public float3 a;
    public float3 b;
    public float  radius;
}
비트 레이아웃
float3 a (96b)
float3 b (96b)
r (32b)
feat
= 256 bit
128bit 기준선 초과 — SIMD TODO 대상 (가장 큼)