Jump to content
Mattline1

Environment probes - blending issues

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.

Share this post


Link to post

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.

Share this post


Link to post

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?

Share this post


Link to post

Hey, that's a pretty smart idea. Not sure if it will work with the ambient / directional pass but I will try it out.

Share this post


Link to post

Join the conversation

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

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.

×
×
  • Create New...