Jump to content
  • Advertisement
Sign in to follow this  
tcige

what does 'w' mean in shader assembler

This topic is 1834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

it seems to be the fourth component of input register, and D3DDECLTYPE_FLOAT3 sets it to 1

Share this post


Link to post
Share on other sites
Advertisement

It's the homogeneous coordinate. I would strongly suggest reading more graphics theory before proceeding.

 

thanks a lot

 

but i do not agree with your opinion, i am using api, not designing api

Share this post


Link to post
Share on other sites

but i do not agree with your opinion, i am using api, not designing api

I do not agree with your opinion. Even if you are just using the API, you will have to deal with matrix transformations at some point in your game and you will have to understand what are homogeneous  coordinates to do it right.

 

Even if your API provides a complete math framework, you will have to know how to use it. To know how to use it you will have to learn maths and linear algebra.

Edited by renega_666

Share this post


Link to post
Share on other sites

Just to reinforce what renega_666 already said: in the context of any graphics programming (and if you have to touch shaders, you are way in), not knowing about homogeneous coordinates is like taking a job as a driver, then get into the car, point at the steering wheel and ask 'What's that?'. 

Share this post


Link to post
Share on other sites

Just to reinforce what renega_666 already said: in the context of any graphics programming (and if you have to touch shaders, you are way in), not knowing about homogeneous coordinates is like taking a job as a driver, then get into the car, point at the steering wheel and ask 'What's that?'. 

 

thanks for the info about 'homogeneous', i only see it in 'D3DFVF_XYZRHW', is there some concrete context 'homogeneous' applies

 

you and renega_666 misunderstand what i mean, for example, i do not know rsa, but i can use it easily with CryptoAPI, of course rsa is important

Share this post


Link to post
Share on other sites

you and renega_666 misunderstand what i mean, for example, i do not know rsa, but i can use it easily with CryptoAPI, of course rsa is important

 

Maybe you can get some result from it, encrypt some strings, but to be able to actually write a secure application, you also need to know some crypto theory to use it properly (know when its actually meaningful to use, make your keys secure, use the right algorithms for setting up sessions, verify they work as intended, etc etc)

 

Similarly, you need to know a subset of linear algebra, dealing with transformations and projections, to be able to write and debug 3D graphics code.

Share this post


Link to post
Share on other sites

you and renega_666 misunderstand what i mean, for example, i do not know rsa, but i can use it easily with CryptoAPI, of course rsa is important

And here you misunderstand what we mean. Homogeneous coordinates are not some arcane detail of graphics programming - they are central to it and no one can seriously use a graphics API without knowing about them.

Share this post


Link to post
Share on other sites

is there some concrete context 'homogeneous' applies

Yes it applies to transforms (translation, projection,...) which are used extensively in every game.

 

If you don't understand homogeneous coordinate how can you understand perspective projection? If you don't understand perspective projection, how do you setup a camera for your 3D game? Of course you can follow a tutorial/manual without understanding what's happening and have a working 3D camera but whenever you will have to debug or adapt the code you'll be lost.

 

Linear algebra is something that every game developer should know!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!