Jump to content

useVarianceShadowMaps darkens big part of meshes


KarelAnker
 Share

Recommended Posts

Hi Karel,

 

first of all: do you know the awesome shiney babylon playground? That's this bad boy here: www.babylonjs-playground.com

 

Much better than that old stinky codepen of yours, isn't it? The playground comes with all the fancy stuff like code completion and highlighting of syntax errors and hints like when you forget to write "var" when declaring a new variable ;)

 

So your scene could be something like that in the playground: http://www.babylonjs-playground.com/#2UJZR

It's a bit cleaner, bit easier to play with. I had to change your Mesh.CreateBox to MeshBuilder.CreateBox to suit the latest Babylon version. I added some "var" here and there and I left that switching between varianceShadowMap on/off out.

 

 

Now about your question, it's been asked in a lot of topics already and in my opinion it is still a problem for some people (I am talking about me here ;) ). I fear self-shadowing like you want it is just not possible at the moment with the varianceShadowMaps. Why you ask? Well, let me put it like this, when ever you don't understand something, it's best to use a quote:

 

Unfortunately, this is a strong constraint of the blurred shadows (due mainly to the lack of precision of RGBA32 texture).

source: http://www.html5gamedevs.com/topic/12682-odd-self-shadowing/

 

I know that's not what you hoped to hear, sorry. As I said I wish it would work like that myself.

 

So what now? Maybe just stick with the Poisson Sampling, doesn't look too bad, if you ask me: http://www.babylonjs-playground.com/#2UJZR#1

 

 

 

For those who read a lot in this forum: this post was written in the style of Wingnut, just because ; )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...