Refactored deferred lights code, and skipping SSAA when sample count is 1

This commit is contained in:
dexy
2019-12-04 17:54:48 +11:00
Unverified
parent 1843d70652
commit 152d439f89
19 changed files with 480 additions and 183 deletions
+30
View File
@@ -0,0 +1,30 @@
#include "Common.hlsli"
struct VS_Output
{
float4 Pos : SV_POSITION;
float4 Screen : TEXCOORD0;
};
cbuffer VSLightVars : register(b0)
{
float4x4 ViewProj;
float4 CameraPos;
uint LightType; //0=directional, 1=Point, 2=Spot, 4=Capsule
uint IsLOD; //useful or not?
uint Pad0;
uint Pad1;
}
VS_Output main(float4 ipos : POSITION)
{
float3 opos = ipos.xyz;
float4 spos = mul(float4(opos, 1), ViewProj);
VS_Output output;
output.Pos = spos;
output.Screen = spos;
return output;
}