diff --git a/Code/OysterGraphics/Shader/Passes/Gather/GatherPixel.hlsl b/Code/OysterGraphics/Shader/Passes/Gather/GatherPixel.hlsl index 0fbf0b92..464da702 100644 --- a/Code/OysterGraphics/Shader/Passes/Gather/GatherPixel.hlsl +++ b/Code/OysterGraphics/Shader/Passes/Gather/GatherPixel.hlsl @@ -45,6 +45,6 @@ PixelOut main(VertexOut input) 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; } \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/Passes/Light/LightCalc.hlsli b/Code/OysterGraphics/Shader/Passes/Light/LightCalc.hlsli index 8a1ff05a..3dc2b45e 100644 --- a/Code/OysterGraphics/Shader/Passes/Light/LightCalc.hlsli +++ b/Code/OysterGraphics/Shader/Passes/Light/LightCalc.hlsli @@ -24,5 +24,7 @@ DiffSpec LightCalc(PointLight pl, float3 pos, int2 texCoord) output.Diffuse = 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; } \ No newline at end of file diff --git a/Code/Tester/MainTest.cpp b/Code/Tester/MainTest.cpp index baf63cb3..3813d3e9 100644 --- a/Code/Tester/MainTest.cpp +++ b/Code/Tester/MainTest.cpp @@ -229,11 +229,11 @@ HRESULT Render(float deltaTime) Oyster::Graphics::API::SetView(V); Oyster::Graphics::API::NewFrame(); - Oyster::Graphics::API::RenderModel(m); + //Oyster::Graphics::API::RenderModel(m); Oyster::Graphics::API::RenderModel(m2); 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(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(t,Oyster::Math::Float2(0.5f,0.5f),Oyster::Math::Float2(1,1)); + //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(); std::wstring fps; float f = 1/deltaTime;