vertexshader vshdr =
decl
{
stream 0;
float v0[3]; //position
float v3[3]; //normal
float v7[3]; //uv 1
float v8[3]; //uv 2
}
asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord0 v7
dcl_texcoord1 v8
ASM_CODE_HERE...
}
Would that decl block not be needed since the dcl_XXX were used in the shader asm? I read something a while back that you have to use the dcl_XXX stuff if you want a DX8 shader to run in DX9.
Thanks.
decl block in FX
I can't find much about using a decl block in an effect and I'm wondering that if you have something like this:
Didn't reply earlier because I didn't have time to check my documentation. I thought something looked odd, and I can't see any mention in the documentation for this decl{ }asm{ } construct you're using - where did you find out about it?
Cheers,
Jack
Cheers,
Jack
It's one of those weird things in FX that MS doesn't document well or at all. I have come across a lot of these kinds of things recently.
This is used in some games and I found it a few times when googling. One page says it's basically a DX8 thing and in DX9 you should change to use the dcl_XXX things instead. I just wanted to be sure of this and I hoped someone here would be familiar with this weirdness.
I first came across it when working with developers at work. I can't remember what game it was that used it but it's out there (unfortuantly).
This is used in some games and I found it a few times when googling. One page says it's basically a DX8 thing and in DX9 you should change to use the dcl_XXX things instead. I just wanted to be sure of this and I hoped someone here would be familiar with this weirdness.
I first came across it when working with developers at work. I can't remember what game it was that used it but it's out there (unfortuantly).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement