From a34db10fd168ecb39cd748437387b497a6df0f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bure=C5=A1?= Date: Thu, 30 Apr 2026 19:40:45 +0200 Subject: [PATCH 1/4] Added reentry testing bookmarks --- Assets/AtmosphericEntryBookmarks.json | 212 +++++++++++++++++++++ Assets/AtmosphericEntryBookmarks.json.meta | 3 + 2 files changed, 215 insertions(+) create mode 100644 Assets/AtmosphericEntryBookmarks.json create mode 100644 Assets/AtmosphericEntryBookmarks.json.meta diff --git a/Assets/AtmosphericEntryBookmarks.json b/Assets/AtmosphericEntryBookmarks.json new file mode 100644 index 0000000..07c51a0 --- /dev/null +++ b/Assets/AtmosphericEntryBookmarks.json @@ -0,0 +1,212 @@ +[ + { + "Type": "Orbit", + "BookmarkName": "Kerbin Low Orbit Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Kerbin", + "inclination": 0.0, + "eccentricity": 0.06666666666666667, + "semiMajorAxis": 675000.0, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -1.8477793001435467, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Kerbin Interplanetary Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Kerbin", + "inclination": 0.0, + "eccentricity": 1.4013761467889898, + "semiMajorAxis": -1569600.0000000037, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -0.09650208064910387, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Duna Low Orbit Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Duna", + "inclination": 0.0, + "eccentricity": 0.10810810810810811, + "semiMajorAxis": 370000.0, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -2.0007707344164998, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Duna Interplanetary Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Duna", + "inclination": 0.0, + "eccentricity": 2.0950241664774536, + "semiMajorAxis": -301363.2119750981, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -0.5022200631786002, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Eve Low Orbit Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Eve", + "inclination": 0.0, + "eccentricity": 0.06329113924050633, + "semiMajorAxis": 790000.0, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -1.9243058855844617, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Eve Interplanetary Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Eve", + "inclination": 0.0, + "eccentricity": 1.5659756098491062, + "semiMajorAxis": -1307476.8366737398, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -0.15222118244788713, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Laythe Low Orbit Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Laythe", + "inclination": 0.0, + "eccentricity": 0.06306306306306306, + "semiMajorAxis": 555000.0, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -1.9567293950096463, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Laythe Interplanetary Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Laythe", + "inclination": 0.0, + "eccentricity": 1.858715583534416, + "semiMajorAxis": -605555.5645790363, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -0.2631678639974687, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Jool Low Orbit Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Jool", + "inclination": 0.0, + "eccentricity": 0.017059301380991064, + "semiMajorAxis": 6155000.0, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -2.224928190193952, + "epoch": 0.0 + } + }, + { + "Type": "Orbit", + "BookmarkName": "Jool Interplanetary Entry", + "State": { + "ReferenceBodyGuid": null, + "Altitude": 0.0, + "Latitude": 0.0, + "Longitude": 0.0, + "VerticalSpeed": 0.0 + }, + "OrbitState": { + "referenceBodyGuid": "Jool", + "inclination": 0.0, + "eccentricity": 1.5353451613510853, + "semiMajorAxis": -11301120.168399807, + "longitudeOfAscendingNode": 0.0, + "argumentOfPeriapsis": 0.0, + "meanAnomalyAtEpoch": -0.07557912193533675, + "epoch": 0.0 + } + } +] diff --git a/Assets/AtmosphericEntryBookmarks.json.meta b/Assets/AtmosphericEntryBookmarks.json.meta new file mode 100644 index 0000000..e914d69 --- /dev/null +++ b/Assets/AtmosphericEntryBookmarks.json.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 51bfbe9b2a1247a9a88db6bd0be49306 +timeCreated: 1777550400 From 933c7e7e5755cdba5266d0d2572b52ac6c59ea05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bure=C5=A1?= Date: Thu, 30 Apr 2026 23:25:07 +0200 Subject: [PATCH 2/4] Updated bookmarks --- Assets/AtmosphericEntryBookmarks.json | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Assets/AtmosphericEntryBookmarks.json b/Assets/AtmosphericEntryBookmarks.json index 07c51a0..5e0aa82 100644 --- a/Assets/AtmosphericEntryBookmarks.json +++ b/Assets/AtmosphericEntryBookmarks.json @@ -12,11 +12,11 @@ "OrbitState": { "referenceBodyGuid": "Kerbin", "inclination": 0.0, - "eccentricity": 0.06666666666666667, - "semiMajorAxis": 675000.0, + "eccentricity": 0.07462686567164178, + "semiMajorAxis": 670000.0, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -1.8477793001435467, + "meanAnomalyAtEpoch": 4.36926878648072, "epoch": 0.0 } }, @@ -33,11 +33,11 @@ "OrbitState": { "referenceBodyGuid": "Kerbin", "inclination": 0.0, - "eccentricity": 1.4013761467889898, + "eccentricity": 1.3950050968399583, "semiMajorAxis": -1569600.0000000037, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -0.09650208064910387, + "meanAnomalyAtEpoch": -0.10335823505470454, "epoch": 0.0 } }, @@ -96,11 +96,11 @@ "OrbitState": { "referenceBodyGuid": "Eve", "inclination": 0.0, - "eccentricity": 0.06329113924050633, - "semiMajorAxis": 790000.0, + "eccentricity": 0.07006369426751585, + "semiMajorAxis": 785000.0, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -1.9243058855844617, + "meanAnomalyAtEpoch": 4.302934525086788, "epoch": 0.0 } }, @@ -117,11 +117,11 @@ "OrbitState": { "referenceBodyGuid": "Eve", "inclination": 0.0, - "eccentricity": 1.5659756098491062, + "eccentricity": 1.558327290797091, "semiMajorAxis": -1307476.8366737398, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -0.15222118244788713, + "meanAnomalyAtEpoch": -0.16163434722945197, "epoch": 0.0 } }, @@ -138,11 +138,11 @@ "OrbitState": { "referenceBodyGuid": "Laythe", "inclination": 0.0, - "eccentricity": 0.06306306306306306, - "semiMajorAxis": 555000.0, + "eccentricity": 0.06787330316742081, + "semiMajorAxis": 552500.0, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -1.9567293950096463, + "meanAnomalyAtEpoch": 4.28690026605933, "epoch": 0.0 } }, @@ -159,11 +159,11 @@ "OrbitState": { "referenceBodyGuid": "Laythe", "inclination": 0.0, - "eccentricity": 1.858715583534416, + "eccentricity": 1.8504587029235084, "semiMajorAxis": -605555.5645790363, "longitudeOfAscendingNode": 0.0, "argumentOfPeriapsis": 0.0, - "meanAnomalyAtEpoch": -0.2631678639974687, + "meanAnomalyAtEpoch": -0.27479921565053084, "epoch": 0.0 } }, From 1e1e1305462623fd1953a9ad913a36628fc4ec9f Mon Sep 17 00:00:00 2001 From: Jason McNew Date: Sat, 23 May 2026 19:22:00 -0500 Subject: [PATCH 3/4] Fix _USE_PQS_BUFFER keyword not seen by unity in CelestialBody_Local_Overlay --- Assets/Shaders/CelestialBody_Local_Overlay.shader | 2 ++ Assets/Shaders/QuadMeshDataBuffer.hlsl | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Shaders/CelestialBody_Local_Overlay.shader b/Assets/Shaders/CelestialBody_Local_Overlay.shader index 8e88416..e0f8a31 100644 --- a/Assets/Shaders/CelestialBody_Local_Overlay.shader +++ b/Assets/Shaders/CelestialBody_Local_Overlay.shader @@ -21,6 +21,8 @@ #include "UnityCG.cginc" #include "QuadMeshDataBuffer.hlsl" + #pragma multi_compile_local __ _USE_PQS_BUFFER + struct v2f { float2 uv : TEXCOORD0; diff --git a/Assets/Shaders/QuadMeshDataBuffer.hlsl b/Assets/Shaders/QuadMeshDataBuffer.hlsl index e03ffde..d8db3f9 100644 --- a/Assets/Shaders/QuadMeshDataBuffer.hlsl +++ b/Assets/Shaders/QuadMeshDataBuffer.hlsl @@ -1,8 +1,6 @@ #ifndef _QUADMESHDATA #define _QUADMESHDATA -#pragma multi_compile_local _USE_PQS_BUFFER - struct QuadMeshData { float3 position; From 616601969603c6febd3b7bfa46949bd4eda86c16 Mon Sep 17 00:00:00 2001 From: Lexi Date: Mon, 10 Aug 2026 17:41:55 -0400 Subject: [PATCH 4/4] Declare the PQS index buffer the way it is allocated VisibleQuadMeshIndices was declared Buffer, 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. --- Assets/Shaders/QuadMeshDataBuffer.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Shaders/QuadMeshDataBuffer.hlsl b/Assets/Shaders/QuadMeshDataBuffer.hlsl index d8db3f9..6f24c7e 100644 --- a/Assets/Shaders/QuadMeshDataBuffer.hlsl +++ b/Assets/Shaders/QuadMeshDataBuffer.hlsl @@ -20,7 +20,7 @@ struct appdata }; #if _USE_PQS_BUFFER -Buffer VisibleQuadMeshIndices; +StructuredBuffer VisibleQuadMeshIndices; StructuredBuffer QuadMeshDataBuffer; #endif