Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 08 23:47
    Auburn commented #124
  • Dec 08 23:46
    Auburn commented #124
  • Dec 08 15:54

    mosra on master

    CgltfImporter: avoid sharing ra… {Cgltf,TinyGltf}Importer: dedic… {Assimp,Cgltf,TinyGltf}Importer… and 3 more (compare)

  • Dec 08 15:39

    mosra on next

    Add a "placeholder" MeshPrimiti… (compare)

  • Dec 08 15:06

    mosra on next

    package/ci: it might be good to… Trade: initial redesign of the … Trade: add SceneField string ma… and 49 more (compare)

  • Dec 08 15:05

    mosra on next

    {Cgltf,TinyGltf}Importer: move … CgltfImporter: XFAIL the test f… {Cgltf,TinyGltf}Importer: renam… (compare)

  • Dec 08 14:48

    mosra on next

    {Cgltf,TinyGltf}Importer: move … CgltfImporter: XFAIL the test f… {Cgltf,TinyGltf}Importer: renam… (compare)

  • Dec 08 14:28

    mosra on next

    {Cgltf,TinyGltf}Importer: move … CgltfImporter: XFAIL the test f… {Cgltf,TinyGltf}Importer: renam… (compare)

  • Dec 08 14:21

    mosra on next

    {Cgltf,TinyGltf}Importer: move … CgltfImporter: XFAIL the test f… {Cgltf,TinyGltf}Importer: renam… (compare)

  • Dec 08 12:32

    mosra on master

    package/homebrew: make this wor… player: add a --map option. package/ci: use new Basis Unive… and 3 more (compare)

  • Dec 08 12:32

    mosra on next

    package/archlinux: dafuq, this … {Cgltf,TinyGltf}Importer: port … PrimitiveImporter: port to the … and 18 more (compare)

  • Dec 08 10:12
    Build #558 passed
  • Dec 08 09:46

    mosra on ports

    package/homebrew: make this wor… doc: rework the first three tut… package/ci: doc++ and 5 more (compare)

  • Dec 08 09:45

    mosra on master

    package/ci: doc++ viewer: port to the new SceneDa… viewer: fix build on 32-bit sys… (compare)

  • Dec 08 09:40

    mosra on next

    package/ci: adopt MinGW lcov ch… package/ci: use Xcode 10.3 imag… player: port to the new SceneDa… (compare)

  • Dec 08 08:23
    Build #3633 passed
  • Dec 08 03:36
    Build #1563 passed
  • Dec 07 23:30

    mosra on ports-next

    texturedquad: AHH FORGOT FILE (compare)

  • Dec 07 23:27

    mosra on ports-next

    texturedquad: AHH FORGOT FILE (compare)

  • Dec 07 23:22
    mosra edited #453
Vladimír Vondruš
@mosra
all examples are in public domain, so you can do whatever you want with them, but for magnum code itself you have to keep the license, yes
curious -- what do you need to change there?
Vladimír Vondruš
@mosra
image.png
apparently CircleCI deployed a broken update on Sunday evening US time and they didn't wake up yet to discover the breakage :D
Vladimír Vondruš
@mosra
Mathew
@lectroMathew

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

I'm not a lawyer, but modifying code probably still qualifies as a 'substantial portion'

Yes that's what I thought as well, but then again having non-original software saying that it is an original software seemed iffy to me, so had to make sure :) I'm also not a lawyer ykno

curious -- what do you need to change there?

Just some changes here and there, renaming and general refactoring to better suit the project

Vladimír Vondruš
@mosra
renaming :eyes:
from my experience it was usually easier to try to upstream the changes instead of maintaining a modified copy, upgrades are less painful that way
Mathew
@lectroMathew

from my experience it was usually easier to try to upstream the changes instead of maintaining a modified copy, upgrades are less painful that way

Oh I ceratainly do believe it's less painful, but magnum's Application class is a bit too monolithic for my needs, so I wanted to take it apart into smaller pieces

Vladimír Vondruš
@mosra
ah, haha, yeah that's true .. though i don't really see a way to break it apart while keeping it easy to switch between SDL/GLFW/... on different platforms
Mathew
@lectroMathew
true, I didn't either so decided to just stick with SDL
Vladimír Vondruš
@mosra

FYI recent Magnum update tightened assertions on Quaternion::fromMatrix(), which requires the matrix to be a proper rotation (before it allowed reflections, but resulted in broken output): mosra/magnum@3697125

if your code starts failing on this new assert and you think it shouldn't, please let me know :)

Fo Nz
@FoNz99089892_twitter

what error do you get?

My bad. I was expecting corrade-rc while compiling for iOS. Excuse me.

Jean-Marie Baran
@Jim-Bar
Hi there, quick question. Do we agree that if I want to do shadow mapping I must drop the PhongGL shader altogether and write my own? Kind of newb on all this shader stuff
pezcode
@pezcode

Hi there, quick question. Do we agree that if I want to do shadow mapping I must drop the PhongGL shader altogether and write my own? Kind of newb on all this shader stuff

Yeah, the shader that calculates lighting needs access to the shadow maps, and PhongGL has no built-in shadow map support.

The shadow mapping example might help you get started:
https://doc.magnum.graphics/magnum/examples-shadows.html
Jean-Marie Baran
@Jim-Bar
Okay, thanks for your answer
hsdk123
@hsdk123
image.png

Hi all, I'm attempting to overlay 2 textures to create 1 texture through the frame buffer.
The result in an image program is the above,
while the frame buffer overlay method I'm using is the below.

I wasn't sure why I'm getting the difference, would anyone understand?

face.png
base.png
(overlay face on base)
I'm using alpha blending when overlaying the textures
Vladimír Vondruš
@mosra
alpha blending is always a trial&error for me :sweat_smile:
what is your clear color set to?
the greyish background above indicates transparency? or is it really just grey
hsdk123
@hsdk123
The grey colour's just the clear colour for the window
The frame buffer that I'm rendering the 2 textures to clears with (0,0,0,0)
Vladimír Vondruš
@mosra
hm there was this neat online tool for figuring out alpha modes somewhere, let me find it
hsdk123
@hsdk123

https://gist.github.com/hsdk123/7f66ecf92d8f51ffaa3e4ac241d4682f

Here's a copy of my code if it shows anything

Vladimír Vondruš
@mosra
are you setting Renderer::setBlendFunction somewhere? i can't see that
what is documented there is one way, you might need some other way depending on whether the images have premultiplied alpha or not, and the tool could help figure out the parameters
hsdk123
@hsdk123
Yeah, it's in
void lvn::CRenderMgr::ApplyBlendMode(const BlendMode& new_mode)
{
    using namespace Magnum;
    static bool init = false;
    static BlendMode cache = BlendMode::BlendAlpha;

    if (!init) {
        GL::Renderer::enable(GL::Renderer::Feature::Blending);
    }
    if (!init || cache != new_mode) {
        GL::Renderer::setBlendFunction(
            static_cast<GL::Renderer::BlendFunction>(new_mode.rgbSrcFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.rgbDstFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.alphaSrcFactor),
            static_cast<GL::Renderer::BlendFunction>(new_mode.alphaDstFactor)
        );
        GL::Renderer::setBlendEquation(
            static_cast<GL::Renderer::BlendEquation>(new_mode.rgbEquation),
            static_cast<GL::Renderer::BlendEquation>(new_mode.alphaEquation)
        );

        cache = new_mode;
    }

    init = true;
}
Vladimír Vondruš
@mosra
ah i see, sorry, did a lazy search and it didn't find Renderer .. now i see it :)
hsdk123
@hsdk123
No problem, I'm sorry I couldn't clean up the code more
Vladimír Vondruš
@mosra
how does it look if you use One / OneMinusSourceAlpha for both RGB and Alpha?
hsdk123
@hsdk123
image.png
Bright white
Jordan Peck
@Auburn
WSL2 has hardware accelerated GUI support in Windows 11 :O
Guillaume Jacquemin
@williamjcm
I'm personally not too thrilled about Windows 11, to be honest.
By the time Windows 10 goes out of support, I'm sure Linux will run pretty much everything I run on Windows, either natively or through Wine/Proton.
Vladimír Vondruš
@mosra
@hsdk123 sorry, had to leave early yesterday .. this looks closer to the ideal, what's special about the bottom row that it gets treated differently? can you also try SourceAlpha / OneMinusSourceAlpha?
Fo Nz
@FoNz99089892_twitter

image.png

This could be a blending function mistake. It happened to me. If you are working on 2D (for GUI, to say...), disable depth test and clear on RGB channels.

hsdk123
@hsdk123

@mosra

what's special about the bottom row

The bottom row, for both images, is semi-transparent. I think that's what's causing it

hsdk123
@hsdk123
image.png
SourceAlpha / OneMinusSourceAlpha
@FoNz99089892_twitter
I was so hoping disabling depth test would work, but sadly it didn't. Any other ideas?