Code cleanup, fixed HLSL shaders

This commit is contained in:
Sascha Willems 2024-01-14 10:24:55 +01:00
parent 6444281e34
commit 7ad9ee1dc3
16 changed files with 274 additions and 408 deletions

View file

@ -1,7 +1,7 @@
// Copyright 2020 Google LLC
Texture2D textureColorMap : register(t2);
SamplerState samplerColorMap : register(s2);
Texture2D textureColorMap : register(t0, space1);
SamplerState samplerColorMap : register(s0, space1);
struct DSOutput
{

View file

@ -2,12 +2,13 @@
struct UBO
{
float4x4 projection;
float4x4 model;
float tessAlpha;
float4x4 projection;
float4x4 model;
float tessAlpha;
float tessLevel;
};
cbuffer ubo : register(b1) { UBO ubo; }
cbuffer ubo : register(b0) { UBO ubo; }
struct HSOutput
{

View file

@ -18,7 +18,10 @@ struct PnPatch
// tessellation levels
struct UBO
{
float tessLevel;
float4x4 projection;
float4x4 model;
float tessAlpha;
float tessLevel;
};
cbuffer ubo : register(b0) { UBO ubo; }
@ -83,7 +86,7 @@ ConstantsHSOutput ConstantsHS(InputPatch<VSOutput, 3> patch, uint InvocationID :
[domain("tri")]
[partitioning("fractional_odd")]
[outputtopology("triangle_ccw")]
[outputtopology("triangle_cw")]
[outputcontrolpoints(3)]
[patchconstantfunc("ConstantsHS")]
[maxtessfactor(20.0f)]

View file

@ -20,9 +20,10 @@ struct UBO
float4x4 projection;
float4x4 model;
float tessAlpha;
float tessLevel;
};
cbuffer ubo : register(b1) { UBO ubo; }
cbuffer ubo : register(b0) { UBO ubo; }
struct HSOutput
{