mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-13 20:35:54 +08:00
Optimised BasicShaderPSGeomVars for DiffuseSampler2, added BasicVS_PNCTT.cso to source control
This commit is contained in:
Binary file not shown.
@@ -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.
Reference in New Issue
Block a user