-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rendering] Lens flare phase1 #66
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asked for some improvements
Whats my general concern - in lots of shader I see dependencies on scene luminance. It never should be there. You should handle all cases when light on scene have max luminance of 1, and when light have luminance of max 1000, or 100'000, etc...). To handle that you should introduce the least amount of constants - I guess only threshould value, which is multiple, so for example when light is twice the average - compute the halo. |
also please leave comments what you changed in your commits so I can review the code faster 🙏 |
Will check comments later tonight |
handle any luminance and improve formatting |
Try using smoothstep (https://registry.khronos.org/OpenGL-Refpages/gl4/html/smoothstep.xhtml) for ghost and halo to make a smooth transition for lights of different intensitities (thus for different average luminance). You should have a luminance point value when halo start appearing and point when it becomes at its max and a smooth transition between. For example you can see that orange light on SandboxApplication scene does not have halo at all, because its luminance is a bit lower when whites. I expect it to have it, but not so bright as for whites. But do not tweak parameters so the effect become visible for this particular light, it should work for large range of light sources with smooth transition depending on their intensities |
Fix mipmap level |
Mostly fine. but I not really like that sky on sponza gives the halo, also the halo is too strong for fires You can move forward with other PR. I will finish this PR myself |
add lens flare