I've started to look into physically based rendering. I'm particularly interested in the Unreal 4 stuff. I've read the Disney paper and the Epic paper, several gamedev.net forum posts and various other Google results. I think I have a decent handle on preconvolving the cubemap for roughness and generating the integrated BRDF lookup table.
I'm struggling, however, to actually apply the Diffuse and Specular components, particularly in regards to the "metallic" parameter. The disney paper states:
metallic - the metallic-ness (0 = dielectric, 1 = metallic). This is a linear blend between two different models. The metallic model has no diffuse component and also has a tinted incident specular, equal to the base color.
When I look at various examples of a shader like this producing a dielectric result, I see stuff like this. Which looks awesome. But when I try a naive approach of "Color = Diffuse + Specular", my results do not look nearly as awesome:
These are both with a "metallic" and "roughness" of 0, for a dielectric, which is what I think that Unreal screenshot is using.
I'm doing my Diffuse and Specular like this:
float3 Diffuse = BaseColor * (1.0 - metallic); float3 SpecularColor = float3(1.0, 1.0, 1.0); float3 SpecularBase = (metallic * BaseColor) + ((1.0 - metallic) * SpecularColor); float3 Specular = ApproximateSpecularIBL(SpecularBase, roughness, N, V); FinalColor = Diffuse + Specular;
...How should I be generating a dieletric result?