|
@ -13,7 +13,7 @@ FullScreenQuad *fsq; |
|
|
void Init() |
|
|
void Init() |
|
|
{ |
|
|
{ |
|
|
model.Init("Res/Sphere.obj"); |
|
|
model.Init("Res/Sphere.obj"); |
|
|
model.mShader->Init("Res/blin.vs", "Res/blin.fs"); |
|
|
|
|
|
|
|
|
model.mShader->Init("Res/point_light.vs", "Res/point_light.fs"); |
|
|
model.SetPosition(0.0f, 0.0f, 0.0f); |
|
|
model.SetPosition(0.0f, 0.0f, 0.0f); |
|
|
|
|
|
|
|
|
//设置环境光参数
|
|
|
//设置环境光参数
|
|
@ -21,7 +21,7 @@ void Init() |
|
|
model.mShader->SetVec4("U_AmbientLight", 0.1f, 0.1f, 0.1f, 1.0f); |
|
|
model.mShader->SetVec4("U_AmbientLight", 0.1f, 0.1f, 0.1f, 1.0f); |
|
|
|
|
|
|
|
|
//设置环境光参数
|
|
|
//设置环境光参数
|
|
|
model.mShader->SetVec4("U_LightPos", 0.0f, 1.0f, 0.0f, 0.0f); |
|
|
|
|
|
|
|
|
model.mShader->SetVec4("U_LightPos", 0.0f, 1.4f, 0.0f, 0.0f); |
|
|
model.SetDiffuseMaterial(0.4f, 0.4f, 0.4f, 1.0f); |
|
|
model.SetDiffuseMaterial(0.4f, 0.4f, 0.4f, 1.0f); |
|
|
model.mShader->SetVec4("U_DiffuseLight", 0.8f, 0.8f, 0.8f, 1.0f); |
|
|
model.mShader->SetVec4("U_DiffuseLight", 0.8f, 0.8f, 0.8f, 1.0f); |
|
|
|
|
|
|
|
|