Audit and implement missing Source shader types #49

Closed
opened 2026-03-20 06:17:16 +00:00 by kit · 1 comment
Owner

Problem

Several Source engine shader types are either not implemented or have incomplete implementations. For full rendering parity we need coverage of every shader that appears in the wild.

Currently missing or incomplete

Shaders currently set to visible = false or unhandled:

  • Wireframe — currently hidden, should render as wireframe overlay
  • DepthWrite / WriteZ / SetZ — utility depth-only shaders (correctly hidden, but verify)

Shaders with simplified fallback implementations:

  • Refract / PortalRefract — no screen-space distortion (see framebuffer copy issue)

Shaders that may appear but aren't in our switch statement:

  • Need to audit VMT files from common maps/models to find any shader types hitting the default fallback

Approach

  1. Add console logging for any shader type that hits the default case in applyVMTProperties
  2. Collect a list of unhandled shaders from real maps
  3. Implement or add proper fallbacks for each
  • #8 — VMT shader types (umbrella issue)
## Problem Several Source engine shader types are either not implemented or have incomplete implementations. For full rendering parity we need coverage of every shader that appears in the wild. ## Currently missing or incomplete Shaders currently set to `visible = false` or unhandled: - **Wireframe** — currently hidden, should render as wireframe overlay - **DepthWrite / WriteZ / SetZ** — utility depth-only shaders (correctly hidden, but verify) Shaders with simplified fallback implementations: - **Refract / PortalRefract** — no screen-space distortion (see framebuffer copy issue) Shaders that may appear but aren't in our switch statement: - Need to audit VMT files from common maps/models to find any shader types hitting the default fallback ## Approach 1. Add console logging for any shader type that hits the default case in `applyVMTProperties` 2. Collect a list of unhandled shaders from real maps 3. Implement or add proper fallbacks for each ## Related - #8 — VMT shader types (umbrella issue)
kit closed this issue 2026-03-20 15:39:56 +00:00
Author
Owner

Implemented in 3491300. Added switch cases for all Source Engine shader types found in the SDK (materialsystem/stdshaders/):

Newly implemented (with appropriate rendering paths):

  • Eyeball, ParticleLitGeneric, PBR (Garry's Mod)
  • Cloak, Predator, Aftershock, VortWarp, GooInGlass, JellyFish (refract path)
  • Portal, PortalStaticOverlay, WindowImposter
  • VolumeClouds, VolumetricFog, Core, Rift
  • LightmappedTwoTexture, Bik/YUV, screenspace_general
  • Wireframe (now renders as wireframe instead of being hidden)

Utility/debug shaders (correctly hidden):

  • Occlusion, Fillrate, all Debug* shaders, WriteStencil, BufferClearObeyStencil

Every shader either has a specific implementation or maps to an appropriate existing path. Unrecognized shaders still fall through to the default lightmapped path.

Implemented in `3491300`. Added switch cases for all Source Engine shader types found in the SDK (`materialsystem/stdshaders/`): **Newly implemented (with appropriate rendering paths):** - Eyeball, ParticleLitGeneric, PBR (Garry's Mod) - Cloak, Predator, Aftershock, VortWarp, GooInGlass, JellyFish (refract path) - Portal, PortalStaticOverlay, WindowImposter - VolumeClouds, VolumetricFog, Core, Rift - LightmappedTwoTexture, Bik/YUV, screenspace_general - Wireframe (now renders as wireframe instead of being hidden) **Utility/debug shaders (correctly hidden):** - Occlusion, Fillrate, all Debug* shaders, WriteStencil, BufferClearObeyStencil Every shader either has a specific implementation or maps to an appropriate existing path. Unrecognized shaders still fall through to the default lightmapped path.
Sign in to join this conversation.
No labels
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
kit/gmod-web-stream#49
No description provided.