OpenSource Brigade 2 alternative?

A picture is worth a thousand words.
Posts: 36
Joined: Wed Sep 12, 2012 2:35 pm

OpenSource Brigade 2 alternative?

Postby lion » Mon Sep 14, 2015 11:52 pm

I'm still working on opensource B2 alternative, almost ready to provide sources. May be someone already did this? :D
Here some example render of abouttime scene:

Currently it uses glsl because CUDA can't run on AMD, and Nvidia do not support OpenCL 2.0, so bindless textures is the only way I found to access all textures with hardware sampling.
Main API:

Code: Select all

struct LGE_DevSettings
    void *m_HDC;
    void *m_HGLRC;
    bool m_threadedGL;
    bool m_enableVSync;

struct LGE_RuntimeParams
    glm::vec4 m_cameraRight;
    glm::vec4 m_cameraUp;
    glm::vec4 m_cameraForward;
    glm::vec4 m_cameraPosition;
    glm::vec4 m_sunDirection;
    glm::vec4 m_sunColor;
    unsigned int m_width;
    unsigned int m_height;
    unsigned int m_spp;
    unsigned int m_skyTexture;
    float m_time;
    float m_secondaryRaysMipmap;
    float m_FOV;
    float m_denoiseAmount;

class LGE_Device
    virtual ~LGE_Device() {};
    virtual bool SetSettings(LGE_DevSettings *pSettings) = 0;
    virtual void SetRuntimeParams(LGE_RuntimeParams *pParams) = 0;
    virtual void Render(unsigned int first_line, unsigned int count)=0;
    virtual void WaitSync()=0;
    virtual void WaitRender()=0;

    virtual unsigned int AddTexture(unsigned int width, unsigned int height, void *image) = 0;
    virtual void DeleteTexture(unsigned int tex) = 0;

    virtual unsigned int AddBVHGeometry(void *pGeometry, unsigned int size) = 0;
    virtual void DeleteBVHGeometry(unsigned int handle) = 0;
    virtual void SetGeometryTransform(unsigned int geometry, glm::vec4 *pTransform) = 0;

    virtual void AttachShader(const char *code, unsigned int slot) = 0;

Posts: 18
Joined: Wed Jun 19, 2013 11:04 am

Re: OpenSource Brigade 2 alternative?

Postby rouncer » Tue Feb 02, 2016 2:09 pm

Nice1, looks like a multibounce system. wish I could see a bit more of it tho.

One thing I know now, is getting a single bounce perfect is worth more than any amount of bounces in a recursive multibounce system.

check this out - and its just rastering->

Notice how the light is really spread well and glowing? A rasterer is forced to do it in one bounce, but can look quite remarkable... a nice glowing daylit scene, provided by a more physically correct specular shape, going all directions with a diffusion is not realistic at all, because it doesnt take into account the roughness of the surface. (micro shadowing.)

Return to “Visuals”

Who is online

Users browsing this forum: No registered users and 1 guest