Optimised BasicShaderPSGeomVars for DiffuseSampler2, added BasicVS_PNCTT.cso to source control

This commit is contained in:
dexy
2019-02-20 20:56:04 +11:00
Unverified
parent 3690b082bc
commit a11ec59dda
4 changed files with 5 additions and 14 deletions
Binary file not shown.
+3 -7
View File
@@ -18,11 +18,7 @@ cbuffer PSSceneVars : register(b0)
}
cbuffer PSGeomVars : register(b2)
{
uint EnableTexture;
uint EnableTexture2;
uint pad1;
uint pad2;
uint pad3;
uint EnableTexture;//1+=diffuse1, 2+=diffuse2
uint EnableTint;
uint EnableNormalMap;
uint EnableSpecMap;
@@ -68,7 +64,7 @@ float4 main(VS_OUTPUT input) : SV_TARGET
{
float4 c = float4(0.5, 0.5, 0.5, 1);
if (RenderMode == 0) c = float4(1, 1, 1, 1);
if (EnableTexture == 1)
if (EnableTexture > 0)
{
float2 texc = input.Texcoord0;
if (RenderMode >= 5)
@@ -79,7 +75,7 @@ float4 main(VS_OUTPUT input) : SV_TARGET
c = Colourmap.Sample(TextureSS, texc);
if (EnableTexture2 == 1)
if (EnableTexture > 1) //2+ enables diffuse2
{
float4 c2 = Colourmap2.Sample(TextureSS, input.Texcoord1);
c = c2.a * c2 + (1 - c2.a) * c;
Binary file not shown.