So many changes again

This commit is contained in:
2026-04-15 16:56:19 +02:00
parent 495e683522
commit 424dea0012
30 changed files with 566 additions and 235 deletions
+4 -1
View File
@@ -5,6 +5,7 @@ import MaterialParameter;
struct Params
{
float4x4 transform;
StructuredBuffer<float> vertexBuffer;
StructuredBuffer<float> normalBuffer;
StructuredBuffer<uint> indexBuffer;
@@ -25,10 +26,12 @@ VertexOut vertexMain(uint vertexId : SV_VertexID)
uint index = params.indexBuffer[vertexId];
float3 vertex = float3(params.vertexBuffer[index * 3 + 0],
params.vertexBuffer[index * 3 + 1],
params.vertexBuffer[index * 3 + 2]) * 5;
params.vertexBuffer[index * 3 + 2]);
float3 normal = float3(params.normalBuffer[index * 3 + 0],
params.normalBuffer[index * 3 + 1],
params.normalBuffer[index * 3 + 2]);
vertex = mul(params.transform, float4(vertex, 1)).xyz;
normal = mul((float3x3)params.transform, normal);
output.position_WS = vertex;
output.position_CS = mul(pViewParams.viewProjectionMatrix, float4(vertex, 1));
output.normal = normal;