Open LeeMcQueen opened 3 years ago
20211101不知道为什么完全失败了
这个URL的 PBR vertexShader和fragmentShader 参照一下 进行修改 1.vertexShader https://github.com/Nadrin/PBR/blob/master/data/shaders/glsl/pbr_fs.glsl 2.fragmentShader https://github.com/Nadrin/PBR/blob/master/data/shaders/glsl/pbr_vs.glsl
3.光向有关的机能 src/common/application.cpp 方向 m_sceneSettings.lights[0].direction = glm::normalize(glm::vec3{-1.0f, 0.0f, 0.0f}); m_sceneSettings.lights[1].direction = glm::normalize(glm::vec3{ 1.0f, 0.0f, 0.0f}); m_sceneSettings.lights[2].direction = glm::normalize(glm::vec3{ 0.0f, -1.0f, 0.0f}); 亮度 m_sceneSettings.lights[0].radiance = glm::vec3{1.0f}; m_sceneSettings.lights[1].radiance = glm::vec3{1.0f}; m_sceneSettings.lights[2].radiance = glm::vec3{1.0f}; *感觉现在不能很好表现的原因是因为距离的问题 手动按照上面的写法直接在Shader里面加入 lightPosition = normalize(vec3(-1.0f, 0.0f, 0.0f)); 不知道lightPosition可不可以写成lightPosition[]数组
vec3 Lo = normalize(eyePosition - vin.position); 这个vin.position 就是 position modelMatrix boneTransform