Browse Source
Optimized lightmap uploads by converting the raw byte pointer from Quake to a NativeArray (unsafe code required) and passing that directly to SetPixelData. This does away with the extra copying step and removes garbage created by Texture2D's implementation.
Optimized lightmap uploads by converting the raw byte pointer from Quake to a NativeArray (unsafe code required) and passing that directly to SetPixelData. This does away with the extra copying step and removes garbage created by Texture2D's implementation.
The old code path is still kept around since the NativeArray version doesn't work inside the Editor for some reason, but it does in standalone builds.readme
5 changed files with 58 additions and 7 deletions
-
25Assets/Scripts/Game/GameAssets.cs
-
21Assets/Scripts/Modules/RenderModule.Interop.cs
-
10Assets/Scripts/Modules/RenderModule.cs
-
5Assets/Scripts/UniQuake.cs
-
2ProjectSettings/ProjectSettings.asset
Write
Preview
Loading…
Cancel
Save
Reference in new issue