Code cleanup, fixed HLSL shaders
This commit is contained in:
parent
6444281e34
commit
7ad9ee1dc3
16 changed files with 274 additions and 408 deletions
|
|
@ -2,11 +2,12 @@
|
|||
|
||||
layout (triangles, fractional_odd_spacing, cw) in;
|
||||
|
||||
layout (binding = 1) uniform UBO
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
float tessAlpha;
|
||||
float tessLevel;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) in vec3 inNormal[];
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -18,7 +18,10 @@ struct PnPatch
|
|||
// tessellation levels
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
float tessLevel;
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
float tessAlpha;
|
||||
float tessLevel;
|
||||
} ubo;
|
||||
|
||||
layout(vertices=3) out;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -15,11 +15,12 @@ struct PnPatch
|
|||
float n101;
|
||||
};
|
||||
|
||||
layout (binding = 1) uniform UBO
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
float tessAlpha;
|
||||
float tessLevel;
|
||||
} ubo;
|
||||
|
||||
layout(triangles, fractional_odd_spacing, cw) in;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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)]
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue