diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index f590f366..ba9bf034 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -36,6 +36,8 @@ struct GameState::MyData bool key_Shoot; bool key_Jump; + bool key_Reload_Shaders; + C_Player player; Camera_FPS camera; @@ -236,6 +238,20 @@ void GameState::ReadKeyInput() else this->privData->key_strafeRight = false; + if( this->privData->input->IsKeyPressed(DIK_R) ) + { + if( !this->privData->key_Reload_Shaders ) + { + //this->privData->nwClient->Send( Protocol_PlayerMovementRight() ); +#ifdef _DEBUG + Graphics::API::ReloadShaders(); +#endif + this->privData->key_Reload_Shaders = true; + } + } + else + this->privData->key_Reload_Shaders = false; + //send delta mouse movement { diff --git a/Code/OysterGraphics/Render/Resources.cpp b/Code/OysterGraphics/Render/Resources.cpp index 82ace315..514960cf 100644 --- a/Code/OysterGraphics/Render/Resources.cpp +++ b/Code/OysterGraphics/Render/Resources.cpp @@ -160,7 +160,7 @@ namespace Oyster D3D11_RASTERIZER_DESC rdesc; rdesc.CullMode = D3D11_CULL_BACK; rdesc.FillMode = D3D11_FILL_SOLID; - rdesc.FrontCounterClockwise = false; + rdesc.FrontCounterClockwise = true; rdesc.DepthBias = 0; rdesc.DepthBiasClamp = 0; rdesc.DepthClipEnable = true; diff --git a/Code/OysterGraphics/Shader/Passes/Blur/BlurHor.hlsl b/Code/OysterGraphics/Shader/Passes/Blur/BlurHor.hlsl index aeb89bda..a6843985 100644 --- a/Code/OysterGraphics/Shader/Passes/Blur/BlurHor.hlsl +++ b/Code/OysterGraphics/Shader/Passes/Blur/BlurHor.hlsl @@ -27,7 +27,7 @@ void main(int3 ThreadID : SV_DispatchThreadID, int3 gThreadID : SV_GroupThreadID blurCol +=Weights[i + blurRadius] * gCache[k]; } - outTex[ThreadID.xy + Start] = blurCol * BlurMask + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask); + outTex[min(ThreadID.xy + Start, Stop-1)] = blurCol * BlurMask + inTex[min(ThreadID.xy + Start, Stop-1)] * ( float4(1,1,1,1) - BlurMask); //outTex[ThreadID.xy + Start] = inTex[ThreadID.xy + Start]; } diff --git a/Code/OysterGraphics/Shader/Passes/Blur/BlurVert.hlsl b/Code/OysterGraphics/Shader/Passes/Blur/BlurVert.hlsl index 24f873db..2933283e 100644 --- a/Code/OysterGraphics/Shader/Passes/Blur/BlurVert.hlsl +++ b/Code/OysterGraphics/Shader/Passes/Blur/BlurVert.hlsl @@ -11,10 +11,10 @@ void main(int3 ThreadID : SV_DispatchThreadID, int3 gThreadID : SV_GroupThreadID } if(gThreadID.y >= N-blurRadius) { - int y = min(ThreadID.y+blurRadius, Stop.y-1); + int y = min(ThreadID.y +blurRadius, Stop.y-1); gCache[gThreadID.y+2*blurRadius] = inTex[int2(ThreadID.x,y) + Start]; } - gCache[gThreadID.y+blurRadius] = inTex[min(ThreadID.xy + Start, Stop.xy-1)]; + gCache[gThreadID.y+blurRadius] = inTex[min(ThreadID.xy + Start, Stop-1)]; GroupMemoryBarrierWithGroupSync(); @@ -27,6 +27,6 @@ void main(int3 ThreadID : SV_DispatchThreadID, int3 gThreadID : SV_GroupThreadID blurCol +=Weights[i + blurRadius] * gCache[k]; } - outTex[ThreadID.xy + Start] = blurCol + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask);; + outTex[min(ThreadID.xy + Start, Stop-1)] = blurCol * BlurMask + inTex[min(ThreadID.xy + Start, Stop-1)] * ( float4(1,1,1,1) - BlurMask);; //outTex[ThreadID.xy + Start] = inTex[ThreadID.xy+ Start]; } \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/Passes/Post/PostPass.hlsl b/Code/OysterGraphics/Shader/Passes/Post/PostPass.hlsl index 346913d8..decf5526 100644 --- a/Code/OysterGraphics/Shader/Passes/Post/PostPass.hlsl +++ b/Code/OysterGraphics/Shader/Passes/Post/PostPass.hlsl @@ -18,7 +18,7 @@ float4 SuperSample(float4 Glow, uint3 DTid) index += float2(0,Output.Length.y/2); index = index / Output.Length; Glow = Ambient.SampleLevel(S1, index,1); - Glow = Glow * Glow.w*10; + Glow = Glow; return Glow; } @@ -28,10 +28,7 @@ void main( uint3 DTid : SV_DispatchThreadID ) { float4 Light = Diffuse[DTid.xy] + saturate(Specular[DTid.xy]); float4 Amb = float4(Ambient[DTid.xy/2].xyz /* * Ambient[DTid.xy/2].w*/, 0); - //float4 Glow = Ambient[DTid.xy/2 + uint2(0,Output.Length.y/2)]; float4 Glow = Ambient[DTid.xy/2 + uint2(0,Output.Length.y/2)]; - - Glow = SuperSample(Glow,DTid); float4 GUI; uint2 index = DTid.xy/2 + uint2((uint)Output.Length.x/(uint)2,0); @@ -42,4 +39,5 @@ void main( uint3 DTid : SV_DispatchThreadID ) Output[DTid.xy] = float4((GUI.xyz * GUI.w) + PostLight, 1); //Output[DTid.xy] = float4(Ambient[DTid.xy/2 + uint2(0,Output.Length.y*0.5f)].xyz,1); + //Output[DTid.xy] = Ambient[DTid.xy]; } \ No newline at end of file