Jump to content

Environment probes - blending issues


Mattline1
 Share

Recommended Posts

In the following post by josh, it is mentioned that light from ambient probes is blended using glBlendEquation(GL_MAX);

 

http://www.leadwerks.com/werkspace/blog/1/entry-1681-ambient-lighting-research/

 

Is it possible to modify this functionality? I've been trying to port my PBR work over to the new environment probes system and have found them to be very useful, but this issue causes some quite noticeable artifacts. as shown below.

 

IncorrectLighting.png

 

The reflection should still be visible even underneath the suns light. There is commented out code within the probe shader labelled additive blending, but it doesn't produce correct results. Nor can I see how an in shader solution could work, given that the shader is clamped with glBlendEquation(GL_MAX);

 

Any solutions? if this can be sorted without c++ it'll remove the "gotchas" from the PBR work.

  • Upvote 1
Link to comment
Share on other sites

Yes.

 

I plan to add functionality so that a probes's material will be used to control the shader used in the post-process effect. This will allow you to create your own material for the probe with your own shader, blend mode, etc.

 

The max blend is usually pretty good because in real life the sunlight would be so bright it would wash out those reflections, and it prevents overlapping probes from becoming too bright.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Sounds good, that'll solve the issue. But I guess making the materials additive will introduce brightening on overlapping probes.

 

Is it not possible to render the probes prior to other lights rather than as a post process? they could then use max blend without other lights affecting the result, then switch back to additive for the dynamic lights. Or is there performance concerns attributed with that?

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

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.

 Share

×
×
  • Create New...