mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Push previous work
This commit is contained in:
@@ -57,10 +57,6 @@ ModelPushConstant pushConstants;
|
||||
// Outputs
|
||||
struct VSOutput {
|
||||
float4 Position : SV_Position;
|
||||
float3 Color : TEXCOORD0;
|
||||
float2 UV : TEXCOORD1;
|
||||
float3 Normal : TEXCOORD2;
|
||||
float3x3 TBN : TEXCOORD3;
|
||||
};
|
||||
|
||||
// Main vertex shader
|
||||
@@ -69,7 +65,6 @@ VSOutput main(uint vertexIndex : SV_VertexID)
|
||||
VSOutput output;
|
||||
|
||||
Camera camData = camera[0];
|
||||
|
||||
ModelData modelData = model[pushConstants.modelIndex];
|
||||
|
||||
// Load vertex data from the buffer
|
||||
@@ -77,13 +72,6 @@ VSOutput main(uint vertexIndex : SV_VertexID)
|
||||
|
||||
// Output the position of each vertex
|
||||
output.Position = mul(camData.proj, mul(camData.view, mul(modelData.model, float4(v.position, 1.0f))));
|
||||
output.Color = normalize(float3(v.position.xyz));
|
||||
output.UV = float2(v.uv_x, v.uv_y);
|
||||
output.Normal = normalize(v.normal);
|
||||
|
||||
float3 T = normalize(mul((float3x3)modelData.model, normalize(v.tangent.xyz)));
|
||||
float3 B = normalize(mul((float3x3)modelData.model, normalize(v.bitangent.xyz)));
|
||||
float3 N = normalize(mul((float3x3)modelData.model, normalize(v.normal)).xyz);
|
||||
output.TBN = transpose(float3x3(T, B, N));
|
||||
return output;
|
||||
}
|
||||
Reference in New Issue
Block a user