[Shaders] Work around (probable) slang bug
This commit is contained in:
parent
cf374cd368
commit
74a56d840c
1 changed files with 5 additions and 3 deletions
|
|
@ -13,15 +13,17 @@ struct STDCamera {
|
|||
float3 position;
|
||||
float3 direction;
|
||||
};
|
||||
|
||||
[vk::binding(1, 0)]
|
||||
StructuredBuffer<STDVertex> vertices;
|
||||
[vk::binding(0, 0)]
|
||||
uniform ConstantBuffer<STDCamera> camera;
|
||||
|
||||
[shader("vertex")]
|
||||
VertexOut vsMain(uint vertex_id: SV_VertexID, uint instance_id: SV_InstanceID, [vk::binding(1, 0)] StructuredBuffer<STDVertex> vertices) {
|
||||
VertexOut vsMain(uint vertex_id: SV_VertexID, uint instance_id: SV_InstanceID){
|
||||
return VertexOut(mul(camera.mvp, float4(vertices[vertex_id].pos, 1.0)), vertices[vertex_id].col);
|
||||
}
|
||||
|
||||
|
||||
[shader("pixel")]
|
||||
float4 fsMain(VertexOut fsIn){
|
||||
return fsIn.col;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue