this is basically the sample that uses the core game dll and multiple thin launchers for desktop and phones. This is the only sample that shows the full power of MONOGAME, to have one codebase, no per target routine maintenance, and not repeat links to shared code or assets. it is working at least for development / test releases on your own code on net6/ mg3.81, while details and glitches get sorted out by the core technology. I have not deploy to android store successful and archine and sideload might now work.
any PR or feedback is welcome or other ways that are simpler, or just use it as a template if you are stuck and want to target mobile and desktop. it shows render target , at least one working clip mask shader, and shared assets. Blending is not perfect and there might be core regression but at least holes , masking work… Multisample in render target through the mask does not work on android but does on GL now…
but if i run a release build its on my phone , signed and works.
CHANGES: now you can touch ClipShader.fx contrl f5 it wil build, run deploy and show a new resullt, used to have to rebuild all.
NOTE: xamarin and emulation , sucks and is so slow… do i recommend plug in ur phone via USB and run it / or debug it like that. BUT there is a bug in VS2022 preview… choose the lowest target in the drop down ( mine says Samsung blah balh 2x)… then run it. otherwise it will try to deploy to stupid emulator and take forever to cancel.
you can see the commits as to what i did , i had to put embedded resource on the shader I’m working on so that it gets rebuilt. for final release tons may change and maybe the embedded resource tag , in MGcore, on the asset , will be trimmed or you can take that out and set it to None. if you do this to png files, it might cause bloat because you dont really want to embedded the sources. its just a trick for touching files to trigger a content rebuild.
the warnings are gone on my BASIC multitarget test rig for a basic clip shader and a shared Game/ asset Net 6 module …but i have no idea why or when those warnings went away or what i did., i and im moving on to my other issues with net48 /wpf/hosting MG. I hope it helps someone, AFAIK there are ZERO mg3.81/net60 samples that work, that show the power of Monogame, one codebase, with shaders, that can reach a billion devices, without much #fdefs, switches or even repeated links, or ANY routine maintenance per platform. i just dont have time to perfect ,it the point is i can work on my codebase again… im not going to deploy or release anytime soon or i would not have updated any tooling, but at least my stuff works and im on the latest toolchain even if its in heavy flux.
TESTED clip shader vs 2022 windows 11 intel on surface studio laptop, deploy to emulator and to ARM64 fairly new samsung android 31 phone.
i just got it so i can touch a shared fx file, build and run and see the changes on android, desktop GL and DX. if anyone wants to review or it try it or simply or correct it, your Welcome. its based on the old samples ut i dont have to link individual assets to each target, just the content.mgcb file.