# How accurate is this method for dictating reflectivity?

This topic is 662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

First off, ill show the GLSL code:

Lighting = mix(texture(Skyboxes[int((1.0f - Roughness) * 8)], R).rgb * Color, Lighting, Roughness);


I have 9 pre-filtered sky boxes for the reflection passed to the fragment shader. So first i choose which skybox to use with "texture(Skyboxes[int((1.0f - Roughness) * 8)], R).rgb". And the Lighting variable is the fragment color after applying the lighting (none PBR). And, again i use Roughness to mix between the two.

However, im doubting its accuracy. When you look into a mirror, you only see the reflection, not the "Color" of the mirror. If i remove the '* Color', it doesnt look right.

Edited by Jim70

##### Share on other sites

Not sure what you are asking. For strictly simulating a mirror surface that can either be purely smooth or rough and have a tint, then this kind of works. The thing to note that is wrong is that you should only have 1 skybox (cubemap) and you should be using mip-mapping and tri-linear filtering on it. Not 8 different cubemaps.

1. 1
Rutin
25
2. 2
JoeJ
20
3. 3
4. 4
5. 5

• 9
• 9
• 46
• 41
• 23
• ### Forum Statistics

• Total Topics
631750
• Total Posts
3002052
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!