126 Commits over 123 Days - 0.04cph!
Merge from fast_debug_draw
Change distance fade to fade to black instead of transparent, which was the original DDraw behavior.
Added missing changes to material variant that Unity didn't save for some damned reason.
Various cleanups and fixes:
- Add InstancedDebugDraw properly to the Main Camera Prefab instead of adding it from code.
- Remove FastDebugLine from always included shaders, utilising shader variant stripping.
- Add material(s) to ensure line shader is included in builds.
- Work around Unity quirk: Can't set shader commands from material property blocks.
- Add a define to avoid matrix packing for easily confused GPU drivers.
- Clean up shader properties and exposed the actual distance for distance fade.
- Expose _Color, _LineWidth, _DistanceFade and _TransformType for potential use without instancing.
Apply D3D11 hack to fix IndirectDrawIndexedArgs.startInstance to Metal and OpenGL as well. Actually, the hack is now enabled for all renderers except Vulkan.
merge from fast_debug_draw (fix shader on metal)
fast debug draw: skip geometry shader on metal
Merge from fast_debug_draw (expand character set)
Expand character set of fast debug draw to all of ASCII and some useful characters from CP437
fix server build (IndirectUtil)
fix server build (FastDebugDraw)
Merge from fast_debug_draw
Don't actually disable QualitySettings.streamingMipmapsActive if we ever had an Update() cycle with it enabled. Instead, enable Texture.streamingTextureForceLoadAll for the same effect without crippling Unity's TextureStreamingManager
Map texture streaming ConVar to the inverse of Texture.streamingTextureForceLoadAll
Merge from fix_texture_streaming - let's see if Jenkins will pick up on this
Merge from /indirect_instancing to fix build
Merge from .../fix_texture_streaming
Experiment: Set streaming mipmaps memory budget as a percentage of available VRAM, rather than calculate it based on texture load.
+ Reworked the DebugLine shader, fixing various isses with pixel alignment and perspective.
+ Added '-' character for negative numbers :)
+ Made sure that text size is always divisible by 4 for a clearer appearance. Also raised the default text thickness to 2. (I'm a fan of thin lines, but you really couldn't read these.)
Cerry-pick BufferMemoryBase, CommandMemoryBase and InstanceMemoryBase
Final refactorings: FastDebugDraw is now InstancedDebugDraw
Added ConVar to switch between old and new system.
Added UnityGLInterceptor as a base to UnityGLEmulator to intercept Unity.GL calls but avoid breaking classic DDraw.
Opted for nested types instead of overly long namespace names.
Exhibit proper resource management in InstancedDebugDraw as well as InstancedDebugMeshGenerator.
Refactor FastDebugDraw to use the new base classes, fix a bug with lingering instances and add a public API that matches with DDraw.
Pull out base classes for instancing: InstanceMemoryBase, CommandMemoryBase and BufferMemoryBase
Restore `ScreenText` functionality. FastDDraw has reached feature parity with DDraw. 🎉
Re-added debug capsule rendering 💊
* Fix text rendering by converting LineStrip topology to Lines
* Allow world-positioned but screen-aligned text like DDraw.Text
* Implement distance fade effect
FastDebugDraw: Established compatibility with the current DDraw system (fixed)
FastDebugDraw: Established compatibility with the current DDraw system
Cherry-pick marking DamageTracker `public`
Mark DamageTracker `public` (third attempt 😤 )
Mark DamageTracker `public` (again 🙄)
Mark DamageTracker `public`
Cherry-pick MemoryBlock, AllocatingMemoryBlock and DamageTracker to be used in FastDebugDraw
(Add) Pull out MemoryBlock, AllocatingMemoryBlock and DamageTracker into separate files so they can be reused. In a different directory this time, so Plastic may allow me to cherry-pick, please.
(Remove) Pull out MemoryBlock, AllocatingMemoryBlock and DamageTracker into separate files so they can be reused. In a different directory this time, so Plastic may allow me to cherry-pick, please.
FastDebugDraw WIP with fucking new files
Add Assets/Scripts/Rendering/Instancing/Indirect directory, hoping that Plastic shuts up about stupid directory conflicts
(Add) Pull out MemoryBlock, AllocatingMemoryBlock and DamageTracker into separate files so they can be reused by /main/fast_debug_draw
(Remove) Pull out MemoryBlock, AllocatingMemoryBlock and DamageTracker into separate files so they can be reused by /main/fast_debug_draw
Use FastDebugDraw to draw debugging information of IndirectInstancing