Skip to content

Latest commit

 

History

History
87 lines (70 loc) · 3.02 KB

README.md

File metadata and controls

87 lines (70 loc) · 3.02 KB

efvk

This is a Vulkan version of my OpenGL engine, efgl.

Current Progress

sponza with many lights Sponza with directional lighting and 2048 lights. The directional light kind of drowns everything out - this would look super cool with shadows.

With this clustered approach, I can get ~30fps with my Intel Xe chip with 2000+ lights in view, and 60fps when I'm not looking at the entire scene. Not bad! On my GTX 980 I am getting 60fps at all times. We are definitely GPU bound (this is obvious from the [tracy](https://github.com/wolfpld/tracy) profile).

At this many lights, almost a quarter of my GPU frame time is taken up by light culling. At 4096, that proportion grows to half. If I really cared about getting insane numbers of lights, I could probably accelerate culling with some kind of light BVH as described in the OG clustered rendering paper, but I don't really want to. I think I want scenes with at most a couple hundred lights and it seems like this will work great in its current state.

The other way to speed things up would be to

  1. Have less draw calls or
  2. Have less data to draw in my draw calls

To do either of these, I'll need to get my entire scene onto my GPU. From here, I can at least do a single draw call from the CPU. Next, I would implement frustrum culling and change that CPU draw call into an indirect one. Next would be occlusion culling, which I have a feeling would be the most helpful. With my naive forward rendering, I'm sure there's tons of overdraw happening.

I think my next goal is shadow mapping my directional light, then skyboxes, then IBL.

After all that, I'll see what I can do to make this a truly GPU-driven renderer.


classic sponza again. with mipmapping
and anisotropic filtering Added mipmap generation and anisotropic filtering!!



classic sponza again. this time with pbr
lighting Sponza again, this time with Cook-Torrance specular BRDF in the fragment shader. Used reinhard tonemapping and gamma correction as well.



image of the classic sponza model, with
albedo textures. There are apparent moire patterns

Model loading with texures. Needs some mip-mapping though, check out the Moire patterns!



image of a multicolor cartoonish monkey
head against a black background

Model loading and depth testing



Image of a multicolor triangle against a black
background

Is that what I think it is?? A triangle!



Relatively close to drawing a triangle!!

Still not even close to drawing a triangle!!