Home > other >  HLSL Shader output semantic problem
HLSL Shader output semantic problem

Time:09-22

Learning DirectX9 Shader recently met a problem about HLSL semantic (Semantics), want to ask everybody a great god:

Reader online instructions have said to the Vertex Shader output POSITION n, but at the moment see teaching are only use POSITION0 this, that the rest POSITION [1 ~ n] is what to do?

And Pixel Shader is the output of COLOR and the DEPTH n, but now see teaching are only use COLOR0 and DEPTH0 this, that the rest of the COLOR [1 ~ n] and the DEPTH of [1 ~ n] is what to do?

CodePudding user response:

No one know?
Or nobody have this aspect of the question?

CodePudding user response:

If a VertexShader using two models, the use of two different models of vertices, more practical, if achieve deformation animation in the GPU, which consists of a model of deformation to the second model, the model in the middle of the interpolation calculation is two models, it is practical for two models, from this,

CodePudding user response:

For example, a mesh can have two texture coordinate, one is a diffuse reflection, one is a normal map,
You can own the flexibility to define multiple vertex data, if you have need
  • Related