@@ -310,7 +310,7 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
310310 auto pipelinePS = new rhi::ProgramState (program);
311311 auto vfmt = axvlm->allocateVertexLayoutDesc ();
312312 vfmt.startLayout (3 );
313- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " LOCAL_POSITION " , 0 } ), rhi::VertexElementType::FLOAT2 , 0 ,
313+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: POSITION ), rhi::VertexElementType::FLOAT2 , 0 ,
314314 false );
315315 cmd.createVertexBuffer (sizeof (Vec2), 6 , CustomCommand::BufferUsage::STATIC );
316316 float a = 1 .1f ;
@@ -319,9 +319,9 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
319319 cmd.setVertexDrawInfo (0 , 6 );
320320
321321 // instanced attributes
322- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_COLOR " , 0 } ), rhi::VertexElementType::FLOAT4 ,
322+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD0 ), rhi::VertexElementType::FLOAT4 ,
323323 offsetof (CircleData, rgba), false , 1 );
324- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_POS_AND_RADIUS " , 0 } ),
324+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD1 ),
325325 rhi::VertexElementType::FLOAT4 , offsetof (CircleData, position), false , 1 );
326326 vfmt.endLayout ();
327327
@@ -342,7 +342,7 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
342342 auto pipelinePS = new rhi::ProgramState (program);
343343 auto vfmt = axvlm->allocateVertexLayoutDesc ();
344344 vfmt.startLayout (4 );
345- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " LOCAL_POSITION " , 0 } ), rhi::VertexElementType::FLOAT2 , 0 ,
345+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: POSITION ), rhi::VertexElementType::FLOAT2 , 0 ,
346346 false );
347347
348348 cmd.createVertexBuffer (sizeof (Vec2), 6 , CustomCommand::BufferUsage::STATIC );
@@ -352,11 +352,11 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
352352 cmd.setVertexDrawInfo (0 , 6 );
353353
354354 // instanced attributes
355- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_TRANSFORM " , 0 } ),
355+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD2 ),
356356 rhi::VertexElementType::FLOAT4 , offsetof (SolidCircleData, transform), false , 1 );
357- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_COLOR " , 0 } ), rhi::VertexElementType::FLOAT4 ,
357+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD0 ), rhi::VertexElementType::FLOAT4 ,
358358 offsetof (SolidCircleData, rgba), false , 1 );
359- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_RADIUS " , 0 } ), rhi::VertexElementType::FLOAT4 ,
359+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD1 ), rhi::VertexElementType::FLOAT4 ,
360360 offsetof (SolidCircleData, radius), false , 1 );
361361 vfmt.endLayout ();
362362
@@ -376,7 +376,7 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
376376 auto pipelinePS = new rhi::ProgramState (program);
377377 auto vfmt = axvlm->allocateVertexLayoutDesc ();
378378 vfmt.startLayout (4 );
379- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " LOCAL_POSITION " , 0 } ), rhi::VertexElementType::FLOAT2 , 0 ,
379+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: POSITION ), rhi::VertexElementType::FLOAT2 , 0 ,
380380 false );
381381
382382 cmd.createVertexBuffer (sizeof (Vec2), 6 , CustomCommand::BufferUsage::STATIC );
@@ -386,12 +386,12 @@ bool SampleDrawNode::initWithWorld(b2WorldId worldId)
386386 cmd.setVertexDrawInfo (0 , 6 );
387387
388388 // instanced attributes
389- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_TRANSFORM " , 0 } ),
389+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD2 ),
390390 rhi::VertexElementType::FLOAT4 , offsetof (CapsuleData, transform), false , 1 );
391- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_COLOR " , 0 } ), rhi::VertexElementType::FLOAT4 ,
391+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD0 ), rhi::VertexElementType::FLOAT4 ,
392392 offsetof (CapsuleData, rgba), false , 1 );
393- vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic{ " INSTANCE_RADIUS_AND_LENGTH " , 0 }) ,
394- rhi::VertexElementType:: FLOAT4 , offsetof (CapsuleData, radius), false , 1 );
393+ vfmt.addAttrib (program->getVertexInputDesc (rhi::VertexSemantic:: TEXCOORD1 ), rhi::VertexElementType:: FLOAT4 ,
394+ offsetof (CapsuleData, radius), false , 1 );
395395 vfmt.endLayout ();
396396
397397 auto pipelineVL = axvlm->getVertexLayout (std::move (vfmt));
0 commit comments