Skip to content

feat(core): implement Fortress config, OIT transparency, and robust n…#654

Open
jvkabum wants to merge 3 commits into
KaijuEngine:masterfrom
jvkabum:master
Open

feat(core): implement Fortress config, OIT transparency, and robust n…#654
jvkabum wants to merge 3 commits into
KaijuEngine:masterfrom
jvkabum:master

Conversation

@jvkabum
Copy link
Copy Markdown

@jvkabum jvkabum commented Mar 26, 2026

…il-safety

Enhance the rendering engine with robust nil-safety checks across the core pipeline, complete OIT transparency support for UI properties, and establish a dedicated configuration profile.

  • Config & Identity:

    • config.json: Established the default FortressVision profile, introducing parameters for custom networking (dfhack_port: 5000), threaded generation (mesher_threads: 4), and extended camera/FOV controls.
  • Shaders & UI Transparency:

    • ui_nine.frag: Refactored background layout to use mix(fragBGColor, texColor * fragColor, texColor.a) for true alpha blending.
    • inc_fragment_oit_block.inl: Removed aggressive discard logic to prevent premature clipping of non-OIT surfaces.
    • panel.go & css_background_color.go: Decoupled BgColor from FgColor using native SetBGColor() and dynamically assigned TextureSquare.
    • css_left.go: Upgraded size handling with helpers.NumFromLength for accurate unit (px) parsing.
  • System-Wide Nil-Safety (Crash Prevention):

    • font.go: Fixed .SelectRoot() validation and implemented strict pointer checks for textures during initFont, createLetterMesh, and RenderMeshes to prevent nil-dereferences.
    • gpu_device_drawing_vulkan.go: Hardened execution queues by returning safely from blitTargetsImpl and combineTargets if render images or pass groups are empty.
    • entity.go & transform.go: Protected initializations by checking allocation states prior to executing matrix setups.
    • material.go: Fortified CreateInstance caching strategy to gracefully bypass missing textures without halting the engine.

…il-safety

Enhance the rendering engine with robust nil-safety checks across the core pipeline, complete OIT transparency support for UI properties, and establish a dedicated configuration profile.

- Config & Identity:
  - config.json: Established the default `FortressVision` profile, introducing parameters for custom networking (dfhack_port: 5000), threaded generation (mesher_threads: 4), and extended camera/FOV controls.

- Shaders & UI Transparency:
  - ui_nine.frag: Refactored background layout to use `mix(fragBGColor, texColor * fragColor, texColor.a)` for true alpha blending.
  - inc_fragment_oit_block.inl: Removed aggressive `discard` logic to prevent premature clipping of non-OIT surfaces.
  - panel.go & css_background_color.go: Decoupled BgColor from FgColor using native `SetBGColor()` and dynamically assigned `TextureSquare`.
  - css_left.go: Upgraded size handling with `helpers.NumFromLength` for accurate unit (`px`) parsing.

- System-Wide Nil-Safety (Crash Prevention):
  - font.go: Fixed `.SelectRoot()` validation and implemented strict pointer checks for textures during `initFont`, `createLetterMesh`, and `RenderMeshes` to prevent nil-dereferences.
  - gpu_device_drawing_vulkan.go: Hardened execution queues by returning safely from `blitTargetsImpl` and `combineTargets` if render images or pass groups are empty.
  - entity.go & transform.go: Protected initializations by checking allocation states prior to executing matrix setups.
  - material.go: Fortified `CreateInstance` caching strategy to gracefully bypass missing textures without halting the engine.
jvkabum added 2 commits March 26, 2026 17:58
- Expanded docs/engine/ui/writing.md to detail dynamic UI updates from backend Go code.
- Covered UIPanel vs UILabel hierarchical dependency within html element tags.
- Documented explicit SetDirty flag execution requirement within render loops.
- Added major warning regarding the "Invisible Canvas Bug" (Pitfalls): defining how basic Screen Space metrics (width, position) must remain under DOM CSS sovereignty instead of being bypassed purely by Go's native coordinate matrices.
- Added UI & Engine layout guardrails to AGENTS.md to protect element positioning from unauthorized structural purges during future AI interactions.
… motor Kaiju

Removidos overrides manuais de layout e estilo no código Go da HUD (

hud.go
) para permitir o controle total via CSS.
Atualizado

hud.html
 com um design "Dark Premium", incluindo painéis translúcidos, métricas coloridas e layout responsivo.
Aplicadas correções críticas (nil-checks) no motor Kaiju em várias propriedades de fonte (font-weight, font-style, font-size, line-height, font-family) para evitar panics durante a aplicação de estilos.
Corrigido um bug de tipagem em

css_font_style.go
 que tentava aplicar peso de fonte em vez de estilo de fonte.
Sincronizadas as IDs entre o HTML e o sistema de atualização de dados em tempo real no Go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant