Merge branch 'Graphics' of https://github.com/dean11/Danbias into GameServer

This commit is contained in:
dean11 2014-02-17 09:14:29 +01:00
commit 222a3b0bec
4 changed files with 10 additions and 4 deletions

View File

@ -28,5 +28,6 @@ void main(int3 ThreadID : SV_DispatchThreadID, int3 gThreadID : SV_GroupThreadID
} }
outTex[ThreadID.xy + Start] = blurCol * BlurMask + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask); outTex[ThreadID.xy + Start] = blurCol * BlurMask + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask);
//outTex[ThreadID.xy + Start] = inTex[ThreadID.xy + Start];
} }

View File

@ -28,5 +28,5 @@ void main(int3 ThreadID : SV_DispatchThreadID, int3 gThreadID : SV_GroupThreadID
} }
outTex[ThreadID.xy + Start] = blurCol + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask);; outTex[ThreadID.xy + Start] = blurCol + inTex[ThreadID.xy + Start] * ( float4(1,1,1,1) - BlurMask);;
//outTex[ThreadID.xy] = inTex[ThreadID.xy]; //outTex[ThreadID.xy + Start] = inTex[ThreadID.xy+ Start];
} }

View File

@ -34,9 +34,14 @@ void main( uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID )
if(DTid.x & 1 && DTid.y & 1 ) if(DTid.x & 1 && DTid.y & 1 )
{ {
float AmbValue = GetSSAO(ViewPos, UV, DTid.xy, GTid.xy/2); float AmbValue = GetSSAO(ViewPos, UV, DTid.xy, GTid.xy/2);
Ambient[DTid.xy/2] = float4(DiffuseGlow[DTid.xy].xyz, AmbValue); float4 DiffBase = DiffuseGlow[DTid.xy];
DiffBase += DiffuseGlow[DTid.xy + uint2(1,0)];
DiffBase += DiffuseGlow[DTid.xy + uint2(0,1)];
DiffBase += DiffuseGlow[DTid.xy + uint2(1,1)];
DiffBase = DiffBase / 4;
Ambient[DTid.xy/2] = float4(DiffBase.xyz, AmbValue);
Ambient[DTid.xy/2 + float2(Pixels.x/2, 0)] = GUI[DTid.xy]; Ambient[DTid.xy/2 + float2(Pixels.x/2, 0)] = GUI[DTid.xy];
Ambient[DTid.xy/2 + float2(0, Pixels.y/2)] = float4(DiffuseGlow[DTid.xy].xyz * DiffuseGlow[DTid.xy].w,1); Ambient[DTid.xy/2 + float2(0, Pixels.y/2)] = float4(DiffBase.xyz * DiffBase.w,1);
Ambient[DTid.xy/2 + Pixels/2] = float4(NormalSpec[DTid.xy].xyz,1); Ambient[DTid.xy/2 + Pixels/2] = float4(NormalSpec[DTid.xy].xyz,1);
} }

View File

@ -43,5 +43,5 @@ void main( uint3 DTid : SV_DispatchThreadID )
PostLight = PostLight * (1 - GUI.w); PostLight = PostLight * (1 - GUI.w);
Output[DTid.xy] = float4((GUI.xyz * GUI.w) + PostLight, 1); Output[DTid.xy] = float4((GUI.xyz * GUI.w) + PostLight, 1);
//Output[DTid.xy] = Ambient[DTid.xy]; //Output[DTid.xy] = float4(Ambient[DTid.xy/2 + uint2(0,Output.Length.y*0.5f)].xyz,1);
} }