Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 19:01
    mrhelmut commented #6884
  • Sep 18 06:24
    nikarh opened #6884
  • Sep 15 09:43
    minimalism closed #6883
  • Sep 15 09:43
    minimalism opened #6883
  • Sep 14 20:38
    domi1819 commented #4982
  • Sep 13 16:38
    SuperPokeunicorn commented #6828
  • Sep 13 16:38
    SuperPokeunicorn closed #6828
  • Sep 12 16:39
    Jjagg commented #6768
  • Sep 12 12:55
    mrhelmut commented #6768
  • Sep 12 05:01
    Jjagg commented #6879
  • Sep 12 04:58
    Jjagg commented #6880
  • Sep 11 23:53
    mrhelmut edited #6879
  • Sep 11 23:52
    mrhelmut edited #6879
  • Sep 11 23:47
    mrhelmut edited #6879
  • Sep 11 23:47
    mrhelmut edited #6879
  • Sep 11 23:43
    mrhelmut edited #6879
  • Sep 11 23:41
    mrhelmut edited #6879
  • Sep 11 23:27
    mrhelmut edited #6879
  • Sep 11 23:26
    mrhelmut edited #6879
  • Sep 11 23:26
    mrhelmut edited #6879
RUSshy
@RUSshy
happen when End() is called, when Texture is changed or any other state (Effect/BlendState etc)
if i remember correctly
here cost of each state change https://i.stack.imgur.com/JgrSc.jpg
Effect is costly, and then Texture switch too
avoid changing effect too often, and pack your textures using texture packer, and sort your sprites to avoid many state changes
Ryan Cheung
@ryancheung
Leave my question, I got the answer in MG discord now, thanks.
Texture switch?
Give I have 200 small textures in a batch call, does it generate lots of texture switch?
Ryan Cheung
@ryancheung
I’m thinking use texture atlas to group smalls textures to one large texture. Discord MG member told me this wouldn’t matter much. Is it right?
Ryan Cheung
@ryancheung
Got it
RUSshy
@RUSshy
if you target mobile it matter a lot
Ryan Cheung
@ryancheung
yep I target mobile and get a low FPS
RUSshy
@RUSshy
i use this tool for packing textures: https://github.com/crashinvaders/gdx-texture-packer-gui it is for libgdx, but there are some importers made for monogame, for example: https://github.com/prime31/Nez/tree/master/Nez.PipelineImporter/LibGdxAtlases
Vinicius Jarina
@viniciusjarina
Hi. Is there any reason why the MonoGame NuGet assembly isn't strong named sign?
Jesse
@Jjagg
There was never much interest in it
Vinicius Jarina
@viniciusjarina
I think would be nice to have, since if you have a dll (with strong name key) and want to reference MG from NuGet, right now is impossible :confused:
and if you don’t use the strong name you can reference a strong named assembly. So there is no downside in sign it.
YTN0
@YTN0
I can't draw the texture from a swapchain to the screen using spritebatch. Any ideas why? I get a sharpdx invalid parameter error
specifically on endBatch
Jesse
@Jjagg
I think the texture might be created with a special flag to serve as a swapchain
I've never really looked into the swapchain stuff in MG, it seemed like it'd been shoehorned in
Roman Shapiro
@rds1983
I've a question
for me number one missing MG feature is ability to compile effects in the run-time
so question - is it theoretically possible to add it with modern technologies such as SPIR-V?
or still not possible?
Michael Cummings (MSFT)
@mcumming
@rds1983 Being able to compile Effects at runtime is entirely on the availability of an hlsl or glsl compiler for the target platform. It's entirely possible to do it on desktop OSs, but not so much on iOS or Android without a lot of additional effort. What is the driver behind wanting this feature since you need to compile your app for each platform anyway, why not just compile your Effects at that time?
Roman Shapiro
@rds1983
@mcumming let's say I am making a 3d engine and I've one uber shader that has macro parameters like number of direct lights, number of point lights, number of flashpoint lights, number of bones(for skinning), etc
and thing is I may not know how much actual lights the rendered scene has
so I want that shader to be compiled in the run-time with macro parameters corresponding to the scene actual number of lights and bones
Jesse
@Jjagg
Sure you can do runtime compilation, as long as your compiler works on the platforms you're targeting
Meaning currently you can do it on Windows only
I have a WIP project for a SPIRV shader content pipeline, but don't have time to spend on it right now, unfortunately
RUSshy
@RUSshy
if target just desktop, this is kinda overcomplexing the project ? should just expose GL api so people who care just about desktop can load their GLSL shaders without issues
Michael Cummings (MSFT)
@mcumming
@rds1983, sounds to me like you are trying to solve the game developers problem for them. Or to say it another way, you are recreating the fixed fuction pipeline using a monolithic shader. It's been done before, like Ogre3D Shader Component.
YTN0
@YTN0
Does anyone else have issues when they click on the "build server" link on the github page?
don't know if it's my router / internet or something else
Kodaloid
@kodaloid
Not sure if it matters to anyone, but I've been having a few problems on my hardware with infrequent stutter for a few weeks. Completely went away after an nvidia driver update!
Stutter was occurring on my desktop 1070, and my laptop 1050ti, driver is v436.15 on 64bit Win 10.
I mean the fixed driver.
Daniel Sör
@Ragath
@rds1983 assuming you're not planning on recalculating those during active gameplay, you could analyze your scenes as part of the build pipeline and compile a bunch of different versions of the shader there
Roman Shapiro
@rds1983
@Ragath it'll work if I dont have too many different variants
where total amount of possible variants is close to 1 million probably
Daniel Sör
@Ragath
@rds1983 true, but you wont need to generate a version for every possible variant. just the versions your game would use will be enough (probably 1 per scene at most)
Roman Shapiro
@rds1983
a scene might change during the game and there could be no precompiled variant available
anyway my question was not about how to workaround absence of run-time shader compilation
my question was about whether it is technically possible know to add run-time shader compilation to monogame
when we have stuff like SPIR-V and SPIR-V Cross
RUSshy
@RUSshy
@rds1983 i ported libgdx to c# already (opengl, not monogame) if you are interested: https://github.com/ryuukk/arc_cs/tree/63337cf43a047d71536e927827b4019620394115 (don't look after this commit, i started experimenting with some new weird stuff)
Roman Shapiro
@rds1983
@RUSshy nice