Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4126394
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:01:34+00:00 2026-05-21T00:01:34+00:00

Say you ask directX to send in vertex data from multiple vertex buffers like

  • 0

Say you ask directX to send in vertex data from multiple vertex buffers like so:

immediateContext->IASetVertexBuffers( 0, 3, bufferArray, &vertexStride, 0 );
immediateContext->IASetIndexBuffer( indexBuffer, DXGI_FORMAT_R32_UINT, 0 );
immediateContext->DrawIndexed( numIndices, 0 , 0 );

Now HLSL side should I be doing something like this:

struct FatVertex
{
    float4 dataFromVertexBuffer1: SemanticName1
    float4 dataFromVertexBuffer2: SemanticName2
    float4 dataFromVertexBuffer3: SemanticName3
};

PixelShaderInput VertexShader( FatVertex input )
{
    // Transform things, fill PixelShaderInput struct etc.
}

Or something like this:

struct BufferData1
{
    float4 dataFromVertexBuffer1: SemanticName1
};

struct BufferData2
{
    float4 dataFromVertexBuffer2: SemanticName2
};

struct BufferData3
{
    float4 dataFromVertexBuffer3: SemanticName3
};

PixelShaderInput VertexShader( BufferData1 input1, BufferData2 input2, BufferData3 input3 )
{
    // Transform things, fill PixelShaderInput struct etc.
}

Or are both perfectly valid (as I am assuming that the semantic name tells Direct3D where to put things).

This is all Direct3D11.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T00:01:35+00:00Added an answer on May 21, 2026 at 12:01 am

    Both ways are legal, HLSL does indeed use the semantic index. This allows for a lot of flexibility and is really quite wonderful for someone used to GLSL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is not much to say here - I'd like to ask which of
say I have a Ruby range, 1..500 , and I'd like to ask the
Say you have an application divided into 3-tiers: GUI, business logic, and data access.
Say I have a class named Frog, it looks like: public class Frog {
I wanted to ask a question... Let's say there are 2 people: Peter and
Say I have a method like this: public void SaveData() { try { foreach
Say I have the following class: @interface Frob : NSObject { NSData *data; }
Let's say I ask a users for some random letters and numbers. let's say
so let's say I ask the user to specify what he wants to call
I am using http keep-alive on a apache server, Lets say I ask it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.