BattletechModders / IRTweaks

Assorted gameplay tweaks for HBS's BattleTech game.
MIT License
8 stars 14 forks source link

Make map borders more obvious #46

Open IceRaptor opened 3 years ago

IceRaptor commented 3 years ago

i failed to keep the logs - this was a mission restart, i was just more careful. i am including the logs taken from the RT client button, this was AFTER i had restarted the drop - apologies if the out-of-bounds data is now missing Attachment file type: archive out-of-bounds-drop-RogueLogs.zip 7.65 MB Alekto11/17/2020 @Modder dont know who of you to poke, but it makes sense to make the borders more obvious C-bills11/17/2020 thank you Team RT - you're just amazing - and i do deliver cider because you're all sooo worth supporting Cargo_Vroom11/17/2020 There doesn't seem to be any exposed settings for that in Mission Control Alekto11/17/2020 there isnt, or id have changed it to purple months ago Akala Tanara11/17/2020 more obvious borders would be lovely :smile: -hides- gnivler11/17/2020 finding it is the hard part.. so far nothing with btdebug or assembly perusal

IceRaptor commented 3 years ago

In trying to make the map edges 'more visible' I ended up tracking down the subtle orange edge to the FogScattering component of the Camera gameobject. That's linked to the FogScattering.RefreshBoundaryTex() method, which reads a boundary texture from EncounterLayerData.GetEncounterBoundaryTexture(). From what I can tell, it looks like it fills a rectangular region with a map, reads in the "Hidden/BT-ConvertToSDF" shader, and then blits that against the current screen texture That's then referenced in FogScattering.OnRenderImage, which enables the keyword "_BT_REGIONS" in the shader if that's present. From what I can tell it looks like the 'border' is some kind of edge effect on the texture, not an actual line. Maybe it's a 'fresnel' of some kind? At this point we're well beyond my unity knowledge, unfortunately.