Mattline1 Posted July 31, 2016 Share Posted July 31, 2016 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. 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. 1 Quote Website Twitter Link to comment Share on other sites More sharing options...
Josh Posted August 2, 2016 Share Posted August 2, 2016 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. Quote 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 More sharing options...
Mattline1 Posted August 2, 2016 Author Share Posted August 2, 2016 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? 1 Quote Website Twitter Link to comment Share on other sites More sharing options...
Josh Posted August 2, 2016 Share Posted August 2, 2016 Hey, that's a pretty smart idea. Not sure if it will work with the ambient / directional pass but I will try it out. Quote 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 More sharing options...
Josh Posted August 16, 2016 Share Posted August 16, 2016 This does look a lot better: http://www.leadwerks.com/werkspace/page/viewitem?fileid=745137315 5 Quote 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 More sharing options...
Crazycarpet Posted August 16, 2016 Share Posted August 16, 2016 Yeah that does look great, hope that comes in an update soon. Quote Link to comment Share on other sites More sharing options...
Mattline1 Posted August 16, 2016 Author Share Posted August 16, 2016 Nice, looking forward to seeing this in the engine. Quote Website Twitter Link to comment Share on other sites More sharing options...
Recommended Posts
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.