[GH-ISSUE #5899] Shader API: a post pass can't read a surface's normal or smoothness #1877

Closed
opened 2026-11-02 15:50:19 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Teiwazik on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5899

Originally assigned to: @Teiwazik on GitHub.

🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally.

A post pass sees the world's colour and depth. Screen-space reflections, ambient occlusion and temporal filtering also need each pixel's normal and smoothness, and which kind of surface it is. A normal rebuilt from depth loses the normal map, and there's no way to pass smoothness or a material class from the material stage.

Proposed: set_surface(normal, smoothness, data) in the material stage and surface_at(texel) in the post stage, costing nothing for a pack that doesn't call set_surface.

Originally created by @Teiwazik on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5899 Originally assigned to: @Teiwazik on GitHub. > 🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. A post pass sees the world's colour and depth. Screen-space reflections, ambient occlusion and temporal filtering also need each pixel's normal and smoothness, and which kind of surface it is. A normal rebuilt from depth loses the normal map, and there's no way to pass smoothness or a material class from the material stage. Proposed: `set_surface(normal, smoothness, data)` in the material stage and `surface_at(texel)` in the post stage, costing nothing for a pack that doesn't call `set_surface`.
Author
Owner

@Teiwazik commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6557403090 --> @Teiwazik commented on GitHub (Nov 1, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1877
No description provided.