Skip to content

Fix/new shader issues - #6

Open
cheese3660 wants to merge 5 commits into
Safarte:unityfrom
KSP2Community:fix/new-shader-issues
Open

Fix/new shader issues#6
cheese3660 wants to merge 5 commits into
Safarte:unityfrom
KSP2Community:fix/new-shader-issues

Conversation

@cheese3660

Copy link
Copy Markdown

No description provided.

jan-bures and others added 5 commits April 30, 2026 19:40
Fix _USE_PQS_BUFFER keyword not seen by unity in CelestialBody_Local_Overlay
VisibleQuadMeshIndices was declared Buffer<uint>, which compiles to a typed
fetch and needs an SRV carrying a real DXGI format. The buffer bound to it
is PQSRenderer's culled index buffer, allocated with ComputeBufferType.Default
and so viewed as a structured buffer with DXGI_FORMAT_UNKNOWN.

A typed load against a format-less view is undefined in D3D11. At stride 4
a structured descriptor is bit-compatible with R32_UINT, so the mismatch is
invisible on NVIDIA and AMD; drivers that encode typed surfaces separately
take every load out of bounds and read back zero, collapsing the overlay
geometry onto a single quad.

The same declaration in the SDK's terrain and overlay shaders is corrected
in KSP2Redux/SDK#fix/new-shader-issues.
@cheese3660
cheese3660 changed the base branch from main to dev August 10, 2026 21:42
@cheese3660
cheese3660 changed the base branch from dev to unity August 10, 2026 21:42
@cheese3660

Copy link
Copy Markdown
Author

wait wrong repo

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.

3 participants