You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, since UPBGE is slowly progressing regarding rendering quality, it would be awesome if GGX specular model was implemented.
A nice source for shader maths: here and here.
Also, ever since #728 has been done, there is now a parameter called "radius" exposed to lights. This means that the attenuation method for speculars can be changed. Currently the attenuation of diffuse is used also for specular, but that is not accurate. As light source gets further from surface, the specular highlight does not become darker. Instead, it becomes smaller. Now this is how to do this:
if the reflection ray intersects with sphere (basic ray/sphere collision test required), then the specular highlights on that fragment must be at the peak intensity.
if the reflection ray does not intersect with the light sphere, then the closest point on the sphere must be found and that shall be interpreted as light source position. The rest of specular calculation follows as usual.
Now if this is implemented, the speculars should no longer be affected by diffuse attenuation. They should be full brightness no matter what.
Lastly, for purposes of realism specular higlights should be combined this way: color = diffuse * (1.0 - min(specular, 1.0)) + specular
instead of color = diffuse + specular.
This is required for energy conservation - an important factor in shader realism.
The text was updated successfully, but these errors were encountered:
That's looking very promising. Not sure if geometric shadowing (G term) is completely right. Or is it shadows causing those extremely hard black shades?
Also, roughness parameter should be exposed at texture tab and nodes. That's essential for this to be usable in games with proper assets.
Hey, since UPBGE is slowly progressing regarding rendering quality, it would be awesome if GGX specular model was implemented.
A nice source for shader maths: here and here.
Also, ever since #728 has been done, there is now a parameter called "radius" exposed to lights. This means that the attenuation method for speculars can be changed. Currently the attenuation of diffuse is used also for specular, but that is not accurate. As light source gets further from surface, the specular highlight does not become darker. Instead, it becomes smaller. Now this is how to do this:
Now if this is implemented, the speculars should no longer be affected by diffuse attenuation. They should be full brightness no matter what.
Lastly, for purposes of realism specular higlights should be combined this way:
color = diffuse * (1.0 - min(specular, 1.0)) + specular
instead of
color = diffuse + specular
.This is required for energy conservation - an important factor in shader realism.
The text was updated successfully, but these errors were encountered: