重构材质系统

This commit is contained in:
2025-12-03 23:38:08 +08:00
parent bf62257884
commit 3c0e177905
47 changed files with 755 additions and 1151 deletions
@@ -10,7 +10,7 @@ const char* DebugFragementShader_GeometryNormal::getName(void) const
return "debug:geometry_normal";
}
void DebugFragementShader_GeometryNormal::prepare(const davinci::RenderPipe* pipe, davinci::MaterialConstPtr material)
void DebugFragementShader_GeometryNormal::begin(const davinci::RenderPipe* pipe, davinci::MaterialConstPtr material)
{
m_pipe = pipe;
m_material = material;
@@ -26,5 +26,10 @@ void DebugFragementShader_GeometryNormal::process(const davinci::VertexDesc& ver
davinci::fVector3 normalColor = *v_normal;
normalColor.normalise();
normalColor = normalColor * 0.5f + 0.5f;
color = davinci::fVector4(normalColor, 1);
}
void DebugFragementShader_GeometryNormal::end()
{
}