Hot answers tagged hlsl
The return value is computed as x*(1−a)+y*a. in other words if a is -1 then the result will be 2*x-y
EDIT: I see your updates now, I'd suggest you try implementing something such as my first suggestion. Since you didn't post any of your code, I'm going to have to guess at how you're doing the collisions. Are you using a single pixel collision check between the player and the enemy with the wall or other related sprites around it? If so, there are probably ...
It's hard to make out exactly what you mean, but it sounds like you are dividing the vertex position by w as part of your computation in your vertex shader. This is incorrect, the division by w is actually done for you by the graphics processor. Consider the standard transformations here: (Original image from: ...
If you use same semantic for SemanticName, then you need to increase number for SemanticIndex. I also see that you are increasing InputSlot. This may be correct or not depending on how your data is layed out. If you really have 4 vertex streams (vertex buffers) then it's fine, but I assume that your instance transform is stored in one vertex buffer. Then ...
Only top voted, non community-wiki answers of a minimum length are eligible