3000th commit - IrrlichtBAW (GIT repo, v 0.3.0-gamma1)

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

Little Update

Managed to add proper 32bit index support, testing the support with renderer (so we dont have to split meshbuffers larger than 64k verts) and the STL file writer (world 3D printing).
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by roxaz »

Does not seem like there would be much efforts towards merging. devsh maybe you really could come up with repo that contains just commits relevant to irrlicht? If you were using git it is possible.

Also i looked through changes. One thing made me curious - there are quite some code blocks simply commented out. I suppose everyone could benefit from a single line comment saying why it had to be disabled.

Anyhow this is great. Hope you can do that repository wizardry and make it easier for changes to get merged back into irrlicht itself. Thanks!
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

when I start tinkering with irrlicht internals again I'll set up a repo.
Locien
Posts: 25
Joined: Wed Jul 10, 2013 2:43 am

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by Locien »

This is really cool stuff, I had no idea something like this existed. Is this a version that branched off from Irrlicht a few years ago? I'm interested in using it but I don't know if it's compatible with my code since I'm using 1.8.1. I suppose trying it out won't hurt though :P

Also 32 index support sounds really sweet since the 16 bit indexes limit the chunk sizes I can muck around with in my attempts at making a Minecraft-like. This is probably a long shot but, could you upload a version with 32 bit index support or a .diff with the relevant changes?

Either way, really cool stuff and nice to see you sharing it with the community. Oh and an additional question, is this licensed in any form?
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

irrlicht license...

no repo no diffs, you can diff against 1.8.1 ........ the reason, I'm waaaaaayyyy too busy

I can however upload a zip to a hosting service of your choosing
Locien
Posts: 25
Joined: Wed Jul 10, 2013 2:43 am

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by Locien »

devsh wrote:irrlicht license...

no repo no diffs, you can diff against 1.8.1 ........ the reason, I'm waaaaaayyyy too busy

I can however upload a zip to a hosting service of your choosing
Sure that would be fantastic! You could upload it on something like https://mega.nz/ or email me directly if you'd rather do that(sending you a private message with my email address).

Thank you so much, I really appreciate it.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

Semi-complete list of what I'm doing...

May add explanations of the modifications to "date" (Texture Arrays, 3D Textures, and changes to shaders + occlusion queries).

https://docs.google.com/document/d/1BSZ ... sp=sharing
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

I had to kill a lot of functions, example

Code: Select all

 
 
//! Creates an boolean alpha channel of the texture based of an color key position.
void CNullDriver::makeColorKeyTexture(video::ITexture* texture,
                    core::position2d<s32> colorKeyPixelPos,
                    bool zeroTexels) const
{/*
    if (!texture)
        return;
 
    if (texture->getColorFormat() != ECF_A1R5G5B5 &&
        texture->getColorFormat() != ECF_A8R8G8B8 )
    {
        os::Printer::log("Error: Unsupported texture color format for making color key channel.", ELL_ERROR);
        return;
    }
 
    SColor colorKey;
 
    if (texture->getColorFormat() == ECF_A1R5G5B5)
    {
        u16 *p = (u16*)texture->lock(ETLM_READ_ONLY);
 
        if (!p)
        {
            os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR);
            return;
        }
 
        u32 pitch = texture->getPitch() / 2;
 
        const u16 key16Bit = 0x7fff & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X];
 
        colorKey = video::A1R5G5B5toA8R8G8B8(key16Bit);
    }
    else
    {
        u32 *p = (u32*)texture->lock(ETLM_READ_ONLY);
 
        if (!p)
        {
            os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR);
            return;
        }
 
        u32 pitch = texture->getPitch() / 4;
        colorKey = 0x00ffffff & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X];
    }
 
    texture->unlock();
    makeColorKeyTexture(texture, colorKey, zeroTexels);*/
 
        os::Printer::log("DevSH is amazed that you'd even want to do this.", ELL_ERROR);
        return;
}

Right now we're slamming in EXT_direct_state_access and ARB_direct_state_access into the engine because glEnable/Disable and texture target binds were getting on my nerves (also Texture Storage extension is getting slammed in :D)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

Textures are now DSA and Immutable Storage

In the process of adding Sampler objects and a sampler object cache, so that the same texture can be bound to different texture units with different sampling parameters (use trilinear and no filtering at once)

Also removed fixed function material parameters.

Next we will implement the IGPUMeshBuffers which will use VAOs and be created from IMeshBuffer which will map atttributes to IBuffers
*we already migrated to using vertex attributes opengl 3.3 style

Then need to add a IRenderbuffer that can be used instead of textures in FBOs, as they sometimes give higher perf.

After that, one last cleanup remains which is the creation of IFrameBuffer objects which will store the MRT setup (maybe except blending equations) which will allow us to manipulate depth and stencil textures directly.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

We gained 10% by swapping to immutable storage for textures and using sampler objects instead of setting glTextureParameter{i,f,I}{,v} to get the correct sampling
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

Fence Objects added for Threaded Streaming (DMA copies) and Persistently Mapped Buffers
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

XML serialization through IAttribute*** class has been ripped out

so are the Quake3 scene nodes and MD2 and MD3 model loaders


flexible vertex format using VAO encapsulating class which maps to arbitrary IBuffer class ranges done
IMeshBuffer<> is a template which functions either with CPU or GPU buffers as source of data

Irrlicht's particle system will be deleted
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

I'm actually writing unit tests/uncommented tutorials for the FBO/RenderTarget,mesh, material and shader stuff
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - Build A World's Irrlicht

Post by devsh »

We now have 7 examples (1 unfinished about triangle selectors)

Things left to do:
1) Sort out Skinned Meshes with Hardware Skinning and GPU side arrays
2) Fix Mesh Writers (none work yet)
3) Test Drive with BAW (integration)
4) remove unnecessary dynamic_cast<>

And I'll upload our irrlicht with examples to mega.nz
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: To The Rescue of Your FPS - BAW Irrlicht (GIT repo+relea

Post by devsh »

Decided not to use Mega.nz, and set up a GIT repository... under the Apache License (so you cant use our BAW trademark XD)
https://github.com/devshgraphicsprogramming/IrrlichtBAW

NOTES:
1) This version does not have SSE-everywhere, because of the matrix bugs
2) This version only runs on GPUs with ARB_direct_state_access (EXT_direct_state_access backport to be added soon)

Things left to do:
1) Remove unnecessary dynamic_casts
2) Backport EXT_direct_state_access and make (slow) workarounds for non-DSA drivers
3) Make use of IGPUAnimatedMesh compulsory (Hardware Skinning)
4) Fix all 4 mesh writers (only STL works for now)
5) Test Drive with BaW
6) remove all s8,u8,s16,u16,s32,u32,s64,u64 and f32 and replace with float and types from stdint.h
Post Reply