Commit Graph

142 Commits

Author SHA1 Message Date
b630ddce5e Fix texture initialization 2020-07-13 18:04:10 -07:00
47727ef0ce Fix some gui issues 2020-07-12 22:38:37 -07:00
4a3569a7be UI experiments 2020-07-12 20:27:19 -07:00
a9b05a677e Merge branch 'develop' into feature-text 2020-07-02 20:13:46 -07:00
be641272ad Shader fixes and legacy shader code 2020-07-02 19:40:00 -07:00
1ab8d0f6bc Merge branch 'master' into develop 2020-06-29 22:19:31 -07:00
261da9194b Fix projecting onto parts using B9PS 2020-06-29 18:41:46 -07:00
bf2c2cf940 update csproj 2020-06-28 18:18:19 -07:00
48819878dc Add shader keyword support 2020-06-28 18:18:04 -07:00
ab254595ab Fix inverted scale modes and remove unused logs 2020-06-22 14:47:47 -07:00
4cdfac8ccd Global override for selectability and kill part on detach 2020-06-19 23:54:32 -07:00
5db788ed37 Allow selectability in flight to be disabled 2020-06-19 23:24:01 -07:00
5fc9394908 Enable selection for decal colliders in flight, change layer 2020-06-19 22:45:29 -07:00
d8087cce3a Disable collision in flight scene 2020-06-19 22:09:25 -07:00
7487d3fb04 Fix color parsing 2020-06-19 21:55:05 -07:00
533b1f1cf4 Consolidate config parsing and parse layer value 2020-06-19 21:44:43 -07:00
7980ef4791 Fix infinitely scaled decals with zero scale and depth 2020-06-19 17:03:17 -07:00
4d2623a1c6 Layer Test module
idk man
2020-06-19 16:37:35 -07:00
35381fae65 Rename MaterialModifiers namespace 2020-06-19 16:35:10 -07:00
96c625f6f2 changes 2020-06-19 10:36:13 -07:00
0a77ef57b7 Play around more with text rendering 2020-06-19 01:01:46 -07:00
2122b6a0a7 Working font!
thank you sarbian!
2020-06-17 16:53:51 -07:00
f9d9c228ae Various dead-end attempts at font loading and rendering 2020-06-17 16:53:50 -07:00
ecb3eccfe5 Add blit functions 2020-06-17 16:52:33 -07:00
fae34be358 Multiple fixes 2020-06-17 13:57:36 -07:00
742a8f0f30 Small refactor to remove bounds transform in favor of projector
idk just simplifies some things
2020-06-12 17:29:29 -07:00
38ce1184ea Remove broken culling code and fix flag switching 2020-06-11 21:58:04 -07:00
b09695d602 Use bounds to choose projection targets 2020-06-11 21:01:01 -07:00
23c309fa9a Add culling for offscreen decals 2020-06-11 20:49:13 -07:00
3c5fcedca4 Add visible bounding boxes around projection area 2020-06-11 19:59:53 -07:00
e27267c862 Add size calculation modes 2020-06-11 17:30:31 -07:00
a386281fb2 Add slider for edge wear 2020-06-11 16:52:12 -07:00
3ab1414a19 Better normal map handling for parts with no normals 2020-06-11 14:15:37 -07:00
e2f54cb4f7 Fix tile parsing and decal rotation
• Decals now respond to rotation and offset tools again
• Fix tile value parsing
• Fix broken normals when projecting on parts with no normal maps
2020-06-10 12:20:47 -07:00
723efea492 Remove some more debug statements 2020-06-09 00:03:00 -07:00
45fe3d1039 Update symmetry counterparts when tweakables are adjusted 2020-06-08 20:21:26 -07:00
f098e922cb Localize flag events 2020-06-08 19:50:33 -07:00
a4c46b94d2 Add flag selection to flag decals
• Add flag selection code blatantly stolen from WBDecals
• Fix attachment of symmetrically attached decals
2020-06-08 19:38:35 -07:00
e42ff52fb5 Rework decal parameters so they dont reset when changing variants 2020-06-08 15:38:36 -07:00
b3d817e0c3 more things 2020-06-08 13:14:25 -07:00
43ac251ae4 Documentation pass
nobody will ever read these why am I doing this
2020-06-08 12:17:25 -07:00
de2f42a09f Temporarily remove nonfunctional intersection code
Will probably fix at a later date, but its not needed for the plugin to work
2020-06-08 02:16:30 -07:00
1dddb97ca9 Fix tile indexing 2020-06-08 01:56:24 -07:00
a8313127e2 Debug statement cleanup and fix icon creation 2020-06-07 19:52:17 -07:00
79bdc03c4b Add tiling index and size values, for easier tiling
Also API changes made as I chased a bug
2020-06-07 19:39:09 -07:00
d2f81058f8 Refactor yet again and add autotiling 2020-06-06 13:20:50 -07:00
a6fa2dd61c Some cleanup of debug statements 2020-06-06 12:33:51 -07:00
2174f2c07b Destroy materials and properties when MPC is destroyed 2020-06-06 11:28:28 -07:00
4c10f0ecd7 Fix material creation 2020-06-06 01:03:55 -07:00
d04d5120f4 thing 2020-06-05 22:54:55 -07:00
3637f84f5c Remove failed attempt at a culling fix 2020-06-05 21:36:14 -07:00
da1fbf0f2a Fix scaling issues when part is created
• KSP rescales the model object back to 1,1,1 on start, so don't use that for the model that gets scaled
• Some refactoring to consolidate property IDs
• rename some classes because I am indecisive
• Add and Get methods for MaterialPropertyCollection
• Make an attempt at a scale culling fix
2020-06-05 21:29:57 -07:00
0ef46a3182 More work trying to fix part icons 2020-06-05 00:29:23 -07:00
e9c8f3dafb Big refactor to enable preview materials
• add shader variants for decal previewing
• start to add code for part icon
• refactor material properties to be serializable
todo:
• fix decal preview scale (need to call UpdateScale on detached state)
• fix texture preview in part icon
• adjust culling per-object when rendering (turns out cull and ztest values are used by unity at the render time, not by the shader itself, so they can be adjusted in material property blocks!)
2020-06-04 00:12:09 -07:00
6c20675a99 Get flag module working 2020-06-02 22:45:48 -07:00
6a5604911d Major refactor, splitting ModuleConformalDecal 2020-06-02 20:36:45 -07:00
5652f0dda1 small tweaks 2020-06-02 19:11:05 -07:00
d1e4d2ac4f Small refactor to reload tweakables on load 2020-06-02 18:26:40 -07:00
eda068cd66 Get decal switching working mostly 2020-06-02 18:07:05 -07:00
c72e20bd2a Black Lives Matter 2020-06-02 17:17:33 -07:00
5ddf973a76 Run config parsing after MM is done running
MM is now a hard dependency
2020-06-02 17:14:52 -07:00
fccf52ae6e Add manual material property constructors 2020-06-02 17:11:38 -07:00
53538a7b09 Add shader blacklist
Add a configurable blacklist of shaders that can be projected onto
2020-06-02 13:46:16 -07:00
7e520f97ca Refactor material parsing and loading
This should hopefully pave the way for usable module switching using B9PS
2020-06-02 00:53:17 -07:00
114fc745f0 Revert "Decrement instead of increment queue value"
This reverts commit 2f308c3ab6.
2020-06-01 21:28:01 -07:00
dfd4224ae0 Decrement instead of increment queue value
This is a bit more intuitive since newer decals render over older ones
2020-06-01 21:14:41 -07:00
6ae598d9f5 Make material handling more intelligent and add incrementing queue 2020-06-01 21:09:14 -07:00
3e23d8696a Make range and adjustability of tweakables configurable 2020-06-01 17:48:53 -07:00
e4e099618d Fix decal projection being scaled twice 2020-06-01 16:54:07 -07:00
d54887414f Fix part highlighting and the collider disappearing
Completes #2
2020-06-01 15:57:57 -07:00
91a6613707 Fix transform handling and projection culling
Now to figure out why my collider is disappearing...
2020-05-31 23:04:59 -07:00
a12b11a339 Add localization 2020-05-31 18:26:27 -07:00
8a056f5c72 Rework bounds culling and colliders 2020-05-30 22:44:44 -07:00
01e046a7f1 Add test config and get the mod almost working 2020-05-30 17:03:14 -07:00
561b3778ad First compile 2020-05-30 14:24:31 -07:00
8cd456f16e Documentation and cleanup 2020-05-30 13:46:03 -07:00
e504936896 Add projection and loading functionality
ModuleConformalDecal is now, theoretically, sorta working
2020-05-30 13:36:10 -07:00
0b34991f34 Print parsing errors as exceptions 2020-05-30 00:16:40 -07:00
995c9120e5 Add enable/disable logic to ModuleConformingDecal 2020-05-29 23:26:33 -07:00
d5038e19bc Use all cameras and rely on layers for culling
Also cleanup some stuff
2020-05-29 21:15:33 -07:00
1287e729eb Add projection logic 2020-05-29 21:02:58 -07:00
bd1a588ff7 Update project file with OrientedBounds 2020-05-29 19:04:38 -07:00
1f92797072 OrientedBounds cleanup 2020-05-29 19:03:40 -07:00
b72fcb07f0 Add struct for OrientedBounds
Add OrientedBounds struct with functions for testing intersection with other OrientedBounds
2020-05-29 02:17:49 -07:00
387ba964fb Documentation and logging 2020-05-27 15:49:17 -07:00
a1745f6e3a Cleanup and check if material should inherit base normals 2020-05-27 15:43:23 -07:00
a90d24c141 Rename to reflect behavior instead of copying Blowfish 2020-05-27 15:31:56 -07:00
1ed0cfacb7 Add parser for material properties 2020-05-27 15:19:46 -07:00
c0a16e9bbd Remove redundant type identifiers 2020-05-26 23:08:38 -07:00
645e93611b Small refactor 2020-05-26 23:05:07 -07:00
84c2107288 Begin writing material data parsing code 2020-05-26 23:04:19 -07:00
6a000c805e Setup C# project 2020-05-25 20:42:24 -07:00