Jump to content

Vulkan renderer updated with shadow maps

Josh

291 views

Shadow maps are now supported in the new Vulkan renderer, for point, spot, and box lights!

Untitled.thumb.jpg.57eaec84e1caad44523622065af05d87.jpg

Our new forward renderer eliminates all the problems that deferred renderers have with transparency, so shadows and lighting works great with transparent surfaces. Transparent objects even receive lighting from their back face automatically!

Untitled.thumb.jpg.cb3802d0fba9eed4d19b278a28593cdb.jpg

There is some shadow acne, which I am not going to leave alone right now because I want to try some ideas to eliminate it completely, so you never have to adjust offsets or other settings. I also want to take another look at variance shadow maps, as these can produce much better results than depthmap shadows. I also noticed some seams in the edges of point light shadows.

Another interesting thing to note is that the new renderer handles light and shadows with orthographic projection really well.

unknown.png.b1e7d9dbc03a2d22b2d9e25f2cb2727e.png

A new parameter has also been added to the JSON material loader. You can add a scale factor inside the normalTexture block to make normal maps appear bumpier. The default value is 1.0:

"normalTexture": {
	"file": "./glass_dot3.tex",
	"scale": 2.0
}

Also, the Context class has been renamed to "Framebuffer". Use CreateFramebuffer() instead of CreateContext().

  • Like 7


4 Comments


Recommended Comments

@gamecreator If you are asking about shadows on vegetation, there is no vegetation system currently, so that problem is solved. :D

Variance shadow maps don't work without all objects casting shadows so I think this will be in there.

  • Like 3

Share this comment


Link to comment
3 hours ago, Josh said:

@gamecreator If you are asking about shadows on vegetation, there is no vegetation system currently, so that problem is solved. :D

Variance shadow maps don't work without all objects casting shadows so I think this will be in there.

Haha!

I'm not sure I understand the second sentence.  Does that mean that you couldn't turn shadows off on objects?  All or nothing?  Or can you maybe make some shadows so transparent as to be invisible?  ...  And come to think of it, from your recent blog, how would an item merely emitting light, like a ball of light, work?  Would it cast a shadow too?

  • Confused 1

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...