使用phong材质

This commit is contained in:
2025-12-04 23:35:21 +08:00
parent 656ce63d55
commit 5d68961188
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -117,6 +117,7 @@ void drawMainUI()
const char* materialItems[] = { const char* materialItems[] = {
"none", "none",
"classic:phong",
"debug:solid_color", "debug:solid_color",
"debug:base_color_texture", "debug:base_color_texture",
"debug:normal_texture", "debug:normal_texture",
@@ -137,6 +138,7 @@ void drawMainUI()
if (lightNode) if (lightNode)
{ {
uniformBuffer.setAttribute("light0:position", lightNode->getWorldPosition()); uniformBuffer.setAttribute("light0:position", lightNode->getWorldPosition());
uniformBuffer.setAttribute("light0:color", davinci::fVector3::WHITE);
} }
pipe.setAntiAliasingTech(g_aaTech); pipe.setAntiAliasingTech(g_aaTech);
@@ -29,7 +29,7 @@ public:
setVertexShader("dv_standard_shaders.dll", "standard+worldpos+normal-uv0"); setVertexShader("dv_standard_shaders.dll", "standard+worldpos+normal-uv0");
setFragementShader("dv_standard_shaders.dll", "classic:phong"); setFragementShader("dv_standard_shaders.dll", "classic:phong");
registerParam<davinci::fVector4>("u_materialColor", davinci::fVector4::GREEN); registerParam<davinci::fVector4>("u_materialColor", davinci::fVector4::GRAY);
registerParam<float32_t>("u_specularShininess", 64.f); registerParam<float32_t>("u_specularShininess", 64.f);
registerParam<float32_t>("u_specularStrength", 5.f); registerParam<float32_t>("u_specularStrength", 5.f);
} }