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
Unless I misunderstand it doesn't seem correct to use the pixel values of the specular map as the exponent here because brighter values in the specular texture will result in higher exponents, which means less specularity (because r.z is a value less than 1).
Everything I read online says that brighter spots in the specular map should be more shiny.
For example the similar lesson on LearnOpenGL also doesn't use the specular map values as the exponent.
Specifically it seems that the shininess exponent is supposed to be constant and instead the specular map is used to control the amount of specular mixed in.
For implementing tinyrenderer I found that I got good results by taking the specular texture value and converting it to a value between [0-1] and using that as the specular coefficient.
The text was updated successfully, but these errors were encountered:
The code that implements the specular map usage in the renderer looks like this currently:
Unless I misunderstand it doesn't seem correct to use the pixel values of the specular map as the exponent here because brighter values in the specular texture will result in higher exponents, which means less specularity (because r.z is a value less than 1).
Everything I read online says that brighter spots in the specular map should be more shiny.
For example the similar lesson on LearnOpenGL also doesn't use the specular map values as the exponent.
https://learnopengl.com/Lighting/Lighting-maps
Shader here: https://learnopengl.com/code_viewer_gh.php?code=src/2.lighting/4.3.lighting_maps_exercise2/lighting_maps_exercise2.cpp
Specifically it seems that the shininess exponent is supposed to be constant and instead the specular map is used to control the amount of specular mixed in.
For implementing tinyrenderer I found that I got good results by taking the specular texture value and converting it to a value between [0-1] and using that as the specular coefficient.
The text was updated successfully, but these errors were encountered: