Cuboid Engine – Shadow Mapping

Alright, today I have successfully implemented shadow mapping. The Mesh can choose if it wants to cast shadows and receive shadows for performance control. As if you had e.g. 5000 instances of grass, you may not want all instances to cast shadows, or something like that. The previews are probably gonna come up soon as it’s almost done, a screenshot or a small video.

My next goal is going to be Ambient Occlusion or something like that, as my post processing shader is set up.

See you next time!

Advertisements

Cuboid Engine Optimizations and JAP

All right guys,

so I’ve been busy with some few competitions, for some wierd reason we after all came in to the JAP (somehow some businesses gave up), but sadly we only got the 3rd place, little Resume:

So some teams gave up, so some space were available, so we came in. Though we got the 3rd place of the whole portugal (160-180 Businesses), I belive that we should have got the 1st place as we were the only ones who actually build the product ourselves, and didn’t ask another company to do so :(. But it’s something!

In the context of Cuboid Engine, now that the competition is over, I can finally return to my precious… :). But today I implemented Uber Shading, just to increase performance, it looks somehow like this:

Before:

  • Loads of Shaders
  • Time wasted in applying shader bffs to ID3D11DeviceContext
  • Time wasted in blending / alpha support
  • Loads of draw calls (per mesh)

Now

  • One shader for everything
  • One draw call (per mesh)
  • No alpha
  • Only one apply function per frame (not only once as 3rd party may be messing with my device context).

So basically in my Uber Shader High Level Shader Language File i have a struct with loads if integers, like this: cbuffer UberData {int _diff; int _text; int _dirlight; int _bumpmap;}