Fixed Spec coefficient
This commit is contained in:
parent
da5b9c7306
commit
11b6f6eddc
|
@ -45,6 +45,6 @@ PixelOut main(VertexOut input)
|
||||||
|
|
||||||
normal = perturb_normal( normal, normalize(-input.ViewPos), input.UV );
|
normal = perturb_normal( normal, normalize(-input.ViewPos), input.UV );
|
||||||
|
|
||||||
output.NormalSpec = float4(normal, Normal.Sample(S1,input.UV).w);
|
output.NormalSpec = float4(normal, Normal.Sample(S1, input.UV).w*255);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
|
@ -24,5 +24,7 @@ DiffSpec LightCalc(PointLight pl, float3 pos, int2 texCoord)
|
||||||
output.Diffuse = float3(0,0,0);
|
output.Diffuse = float3(0,0,0);
|
||||||
output.Specular = float3(0,0,0);
|
output.Specular = float3(0,0,0);
|
||||||
}
|
}
|
||||||
|
float SpecCo = normalSpec.w < 1 ? 0.0f : 1.0f;
|
||||||
|
output.Specular = output.Specular * SpecCo;
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
|
@ -229,11 +229,11 @@ HRESULT Render(float deltaTime)
|
||||||
Oyster::Graphics::API::SetView(V);
|
Oyster::Graphics::API::SetView(V);
|
||||||
Oyster::Graphics::API::NewFrame();
|
Oyster::Graphics::API::NewFrame();
|
||||||
|
|
||||||
Oyster::Graphics::API::RenderModel(m);
|
//Oyster::Graphics::API::RenderModel(m);
|
||||||
Oyster::Graphics::API::RenderModel(m2);
|
Oyster::Graphics::API::RenderModel(m2);
|
||||||
Oyster::Graphics::API::StartGuiRender();
|
Oyster::Graphics::API::StartGuiRender();
|
||||||
Oyster::Graphics::API::RenderGuiElement(t,Oyster::Math::Float2(0.5f,0.5f),Oyster::Math::Float2(1,1));
|
//Oyster::Graphics::API::RenderGuiElement(t,Oyster::Math::Float2(0.5f,0.5f),Oyster::Math::Float2(1,1));
|
||||||
Oyster::Graphics::API::RenderGuiElement(t2,Oyster::Math::Float2(0.5f,0.1f),Oyster::Math::Float2(0.5f,0.1f),Oyster::Math::Float3(1,0,0));
|
//Oyster::Graphics::API::RenderGuiElement(t2,Oyster::Math::Float2(0.5f,0.5f),Oyster::Math::Float2(1,1),Oyster::Math::Float3(1,0,0));
|
||||||
Oyster::Graphics::API::StartTextRender();
|
Oyster::Graphics::API::StartTextRender();
|
||||||
std::wstring fps;
|
std::wstring fps;
|
||||||
float f = 1/deltaTime;
|
float f = 1/deltaTime;
|
||||||
|
|
Loading…
Reference in New Issue