So many changes again
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user