mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Fixed camera view array
This commit is contained in:
@@ -46,6 +46,7 @@ struct Light
|
||||
[[vk::binding(0, 6)]]
|
||||
StructuredBuffer<Light> lights;
|
||||
|
||||
|
||||
struct CameraView {
|
||||
float4x4 View;
|
||||
float4x4 Projection;
|
||||
|
||||
@@ -45,6 +45,7 @@ struct Light
|
||||
[[vk::binding(0, 6)]]
|
||||
StructuredBuffer<Light> lights;
|
||||
|
||||
|
||||
struct CameraView {
|
||||
float4x4 View;
|
||||
float4x4 Projection;
|
||||
|
||||
@@ -87,7 +87,7 @@ VSOutput main(uint vertexIndex : SV_VertexID)
|
||||
Vertex v = vertexBuffer[vertexIndex];
|
||||
|
||||
// Output the position of each vertex
|
||||
output.Position = mul(camView.Projection, mul(camView.View, mul(modelData.model, float4(v.position, 1.0f))));
|
||||
output.Position = mul(camView.Projection, mul(camView.View,mul(modelData.model, float4(v.position, 1.0f))));
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ VSOutput main(uint vertexIndex : SV_VertexID)
|
||||
VSOutput output;
|
||||
|
||||
Camera camData = camera[0];
|
||||
CameraView camView = cameras[pushConstants.cameraID];
|
||||
CameraView camView = cameras[1];
|
||||
ModelData modelData = model[pushConstants.modelIndex];
|
||||
|
||||
// Load vertex data from the buffer
|
||||
|
||||
Reference in New Issue
Block a user