RT64 icon indicating copy to clipboard operation
RT64 copied to clipboard

Per-Material Reflection Sharpness

Open erherhh4herh opened this issue 3 years ago • 3 comments

This is a rudimentary implementation of reflection blurring. It simulates PBR reflectivity based off of the specular (although this implementation uses ReflectionFactor). I did not create a pull request as my local fork has a lot of hacky code, but the implementation of this is pretty simple.

The code: float3 randDir = getCosHemisphereSample(seed, normal) * ((1 - reflectionFactor) / 20);

The reason specular is not used in this implementation is because that material value is rarely set.

In-Game image (Notice the ground is more blurry than the portal)

erherhh4herh avatar May 12 '21 07:05 erherhh4herh

So this is pretty much trying to simulate the effect of PBR roughness right?

Reflection factor is just a percentage of how much the reflection color is applied. I'd say it's closer to the "metalness" in that aspect, so it's probably best to just add this idea as a separate attribute.

image

DarioSamo avatar May 12 '21 09:05 DarioSamo

This is indeed mimicking roughness in PBR. This implementation is a proof of concept, I was unsure if a full physically-based render pipeline was planned.

Thank you for your time!

erherhh4herh avatar May 12 '21 10:05 erherhh4herh

There's not really a whole lot more that can be done for the existing material system as Phong is very simple to replicate. I have no problem with borrowing some features from PBR for now.

If this is added as "Reflection roughness factor" or something like that I think it's completely fine.

DarioSamo avatar May 12 '21 11:05 DarioSamo