dynamic generation of vertex layouts for GTAV vertex types

This commit is contained in:
Carmine Giugliano
2019-11-11 12:28:37 +01:00
Unverified
parent 918ed7fccf
commit 68bba817d3
11 changed files with 240 additions and 567 deletions
+4 -4
View File
@@ -138,10 +138,10 @@ namespace CodeWalker.Rendering
PSSceneVars = new GpuVarsBuffer<WaterShaderPSSceneVars>(device);
PSGeomVars = new GpuVarsBuffer<WaterShaderPSGeomVars>(device);
layouts.Add(VertexType.PT, new InputLayout(device, vsptbytes, VertexTypePT.GetLayout()));
layouts.Add(VertexType.PCT, new InputLayout(device, vspctbytes, VertexTypePCT.GetLayout()));
layouts.Add(VertexType.Default, new InputLayout(device, vspnctbytes, VertexTypeDefault.GetLayout()));
layouts.Add(VertexType.DefaultEx, new InputLayout(device, vspnctxbytes, VertexTypeDefaultEx.GetLayout()));
layouts.Add(VertexType.PT, new InputLayout(device, vsptbytes, VertexTypeGTAV.GetLayout(VertexType.PT)));
layouts.Add(VertexType.PCT, new InputLayout(device, vspctbytes, VertexTypeGTAV.GetLayout(VertexType.PCT)));
layouts.Add(VertexType.Default, new InputLayout(device, vspnctbytes, VertexTypeGTAV.GetLayout(VertexType.Default)));
layouts.Add(VertexType.DefaultEx, new InputLayout(device, vspnctxbytes, VertexTypeGTAV.GetLayout(VertexType.DefaultEx)));
texsampler = new SamplerState(device, new SamplerStateDescription()
{