Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: question about vertex shader

  1. #1

    question about vertex shader

    hi

    i am new in DX vertex shader , from my reading i understand that Vertex Shader control the rendering pipline ( transformation , lighting )

    whats the major deference between a program work with VS and other with fixed function pipline ?

    dose VS capable for things that FFP could not ?

  2. #2

    Re: question about vertex shader

    A vertex shader allows you to "program" the vertex behaviour of your graphics. You could apply some formula's to achieve specific effects (like a waving surface, your own vertex lighting etc).. FFP doesn't provide this kind of flexibility.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3

    Re: question about vertex shader

    thats true

    but waving surface without VS is possible too !

  4. #4
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: question about vertex shader

    The big difference is that you can for example add extra texture coordinates, calculate normals etc in the vertex shader so you don't have to calculate them in your program, saving bandwidth so your vertex structure can be smaller.
    But mostly you will end up using a vertex shader that also can be done in the FFPL.
    But it simply gives you more flexibility.
    NecroSOFT - End of line -

  5. #5

    Re: question about vertex shader

    Doesn't the big difference come to using pixel-shader?

  6. #6
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: question about vertex shader

    Mostly yes.
    NecroSOFT - End of line -

  7. #7

    Re: question about vertex shader

    thnx

    i've seen alot of great demo scene using vertex shader and the effects were amazing ,

    do you think is it possible to produce a high quality effect without VS ?

  8. #8
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: question about vertex shader

    Yes, but I think it would be slower.
    NecroSOFT - End of line -

  9. #9

    Re: question about vertex shader

    There is only one thing i dislike About vertex shaders (well, when you are going to use one for first time)...you dont have one working by default; i mean, with the fixed pipeline you already have working functions to apply multiple textures with several blend options, vertex world/view transformations, per vertex lighting with matyerials settings, etc...the basic stuff you need to render thousand triangles textured and lightened; but if you say "humm, i would like to add a wave effect...i am going to write a shader for that..." forget it, beside the wave effect you also have to code your self in the shader any function you was using from the fixed pipeline, you cant combine boths, when you switch to shaders, you have to code everithing needed for render a vertex: transformations, textures, blending effects, colors, lighting maths, etc.

    Beside that, once you have one basic vertex shader coded and working for doing basic stuff, then you will want to do everithing in shaders, and none in cpu,


  10. #10

    Re: question about vertex shader

    Don't forget about CUDA.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •