Closed stephen-hqxu closed 2 years ago
The specular power is a hard-coded value in the lighting shader.
https://github.com/stephen-hqxu/superterrainplus/blob/08eb7a6b07d8beb63a1adffe9d70576e4d9594b2/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPDeferredShading.frag#L146
Provide a way to configure it. I also noticed the roughness map in the terrain fragment shader is not written to the geometry buffer and used by the lighting shader, maybe we can calculate the specularity based on texture roughness value?
During initialisation of STPScenePipeline, user can now specify the shading equation to be used for lighting and pass appropriate parameters.
STPScenePipeline
Issue
The specular power is a hard-coded value in the lighting shader.
https://github.com/stephen-hqxu/superterrainplus/blob/08eb7a6b07d8beb63a1adffe9d70576e4d9594b2/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPDeferredShading.frag#L146
Suggestion
Provide a way to configure it. I also noticed the roughness map in the terrain fragment shader is not written to the geometry buffer and used by the lighting shader, maybe we can calculate the specularity based on texture roughness value?