Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 20 2019 14:04
    @bkaradzic banned @VinnyVicious
Julian Xhokaxhiu
@julianxhokaxhiu
Because I was thinking to do the same, which bypasses completely the internal bgfx msaa FB object, but allows us to Multisample on the Framebuffer anyway
atm I'm able to multisample by using the RT with MSAA 0x and using the fb texture color attachment as texture directly
but I think I need to blit if I start to use 2x, 4x, etc.
DanielGavin
@DanielGavin
@msmshazan https://bkaradzic.github.io/bgfx/bgfx.html#_CPPv4N4bgfx7Encoder8setStateE8uint64_t8uint32_t
try the different culls BGFX_STATE_CULL_CW / BGFX_STATE_CULL_CCW.
you should also install renderdoc(it saves so much time on debugging) to look at the vertex buffers and depth framebuffer
Carlos Carrasco
@carloscm
I made my game public last week, it's built on bgfx: https://store.steampowered.com/app/1134710/NIMBY_Rails/
the retrospective post for the development is more technically minded: https://carloscarrasco.com/nimby-rails-retrospective/
I plan on doing more regular posts with more detail, but I had to summarize 18 months in an already too long post
Paul Gruenbacher
@pgruenbacher
@julianxhokaxhiu oh i still have MSAA flag in the bgfx::reset, I haven't investigated whether it's still necessary though, it may not be if I'm rendering msaa to offline framebuffer
Julian Xhokaxhiu
@julianxhokaxhiu
That's the only doubt I have
would you be willing to try?
As you have a working example
Julian Xhokaxhiu
@julianxhokaxhiu
Does anyone knows if loading a DDS file in memory using bimg::imageParse() leads in having the pixel data uncompressed in memory by accessing the ->m_data attribute in the returned struct pointer?
Like manipulating that part before actually uploading it to the GPU
pezcode
@pezcode
bimg shouldn't be touching anything in a dds
the bgfx docs mention emulated texture formats so it's possible that bgfx decompresses it, but I have no experience with that
Julian Xhokaxhiu
@julianxhokaxhiu
I was wondering if I can manipulate the alpha via code
for each pixel
pezcode
@pezcode
if you know the compression format, you can probably do that
Julian Xhokaxhiu
@julianxhokaxhiu
although it's also true I have no idea how the data looks like in memory when the texture has mipmaps
I can definitely get that, so PNG is no issue
but DDS tbh I have no idea how to handle that
ah you know what?
I think I'll apply this alpha on the shader for each color pixel
probably is the safest place, and also more performant
shader sounds a lot easier
Julian Xhokaxhiu
@julianxhokaxhiu
yeah I think i'll do down that road
thanks :)
Бранимир Караџић
@bkaradzic
yeah, bimg doesn't decompress unless you convert formats
and modifying alpha or any channel implies decode/encode process
which is not trivial
Julian Xhokaxhiu
@julianxhokaxhiu
Got it, thanks. Definitely safe to do it on the shader. I'm just trying to find the right flow to move that value in the shader when drawing that texture
But I'll find my way out :)
Since you're around, may I ask which is the best practice to use MSAA in bgfx? Because I don't get the logic behind the fbMsaa attachment being created by BGFX which is submitted ( glBlitFramebuffer ) everytime there is a call to submit
on my side, even MSAA X2 slows down everything after some frames being rendered
Paul Gruenbacher
@pgruenbacher
for bgfx::submit and the _preserveState bool flag doesn't necessarily seem to have the uint64_t setState options saved when submitting to different viewids...
so I think ultimately I need to setState() before each submit() not matter what
though _preserveState does seem to maintain the texture and bindings so that's nice
Бранимир Караџић
@bkaradzic
Paul Gruenbacher
@pgruenbacher
oh nice thx
so if I submit to view(10, BGFX_DISCARD_NONE), and then submit(0), I can expect the view 0 submission to have all the textures, buffers, state to be applied to both render calls. that's what I'm assuming
Бранимир Караџић
@bkaradzic
yes
Paul Gruenbacher
@pgruenbacher
ah no it was a renderer_gl.cpp bug I'm pretty sure, I'll make PR with fix
basically BLEND_ALPHA_COVERAGE and BLEND_INDEPENDENT state changes weren't being caught in the changedFlags
phew
def a bug
Raziel Alphadios
@RazielZ
Hey everyone, so I'm trying to build bgfx following the quick start guide, and genie tells me "with-examples" is an invalid option; any idea what's causing this?
Nevermind, I'm dumb
Raziel Alphadios
@RazielZ
Examples seem to be working nicely after changing windows SDK to 10 on everything relevant (with vs2019 project generation), so, good start