XNA Creators Club Online
Page 1 of 1 (14 items)
Sort Posts: Previous Next

HLSL: How important is it? How often is it used by indie game developers?

Last post 11/18/2009 5:42 PM by Pfo Cubed. 13 replies.
  • 11/17/2009 8:00 PM

    HLSL: How important is it? How often is it used by indie game developers?

    I'm practically new to XNA and have very little experience with 3D game development. I recently started to play around with it and started reading this book that covers HLSL. To me, this is learning a foreign language and it is slowly coming together.

    However, to me it seems a little cumbersome and archaic and probably would take me a lot of time to learn well. I prefer to learn this over time, but wonder:

    a) How much is it used by other indie game developers? Or are you guys just using BasicEffects?

    b) Is it important to get a good grip of this to make some seriously good looking games?

    There is so much to learn in the field of video game development.
  • 11/17/2009 8:06 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    HLSL is very usefull.  but it is also an advanced topic when it comes to graphics programming.  but if you are making a fully fledged 3D game. HLSL is most likely good to include. because  BasicEffect can only do as the name implied "Basic"  things  basic Diffuse, Specular, Ambient, Emissive  lighting. with HLSL the sky is the limit.
    and in my opinion yes if you want cool graphical effects you will need to venture into the realms of HLSL. start slowly and eventually it will make more sense.
     
    when i first started learning HLSL i was like   "How does this make a graphical effect?"  but then as i learned more what was actually going on i realised what did what and how it achieves the final result.
  • 11/17/2009 8:09 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    It depends on what you're doing. :) Some games don't need anything more than SpriteBatch and BasicEffect, while with others it would be really difficult, inefficient, or just plain impossible to do without it!

    leesiulung:
    a) How much is it used by other indie game developers? Or are you guys just using BasicEffects?

    I use it when I need it. For example on Awesome Tank I had to combine a shadow mapping system with a mesh instancing system to get pretty shadows and good performance on the Xbox. On Dungeon Adventure, I don't think I've used any shaders, but in retrospect I probably should have to speed up the monochrome effect a little.

    leesiulung:
    b) Is it important to get a good grip of this to make some seriously good looking games?

    Again, it depends! :) If you have cruddy models and bad sprites then no amount of HLSL will make your game look good. But if you have amazing models it might not be so necessary, but probably still needed to tweak the look of your game to look best. With 2D it's often not as necessary with 3D, at least in my experience.

    If you want a cutting edge looking 3D game, you don't necessarily even need to touch shaders to get realistic lighting - check out the SunBurn engine. It's probably a little on the pricey side if you're just doing this for a hobby, but it is incredibly simple to use (easier than using BasicEffect!) and gives great results.

    Overall though, you'll find something that needs HLSL that you can't get around. IMO it is a valuable skill to learn, especially if you're doing 3D.

    leesiulung:

    There is so much to learn in the field of video game development.

    Very true.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 11/17/2009 8:35 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    HLSL is not just about making graphics look prettier, it's also about offloading significant amounts of work to the GPU, freeing up your CPU for better AI, physics etc.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 11/17/2009 9:31 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    I don't think it's possible to understate the importance of HLSL.

    It might seem cumbersome at first, and it is a little, but if you compare it to fixed function pipeline and then size up its capabilities, and most importantly its execution speed, you will see that it is invaluable.

    It's very often used by Indie developers, or anyone doing 3D graphics.  There are alternatives to HLSL but they aren't a whole lot different, the general idea is the same.  XNA works with HLSL exclusively, so if you are using XNA you will be using HLSL.
  • 11/17/2009 9:35 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    And HLSL allows you to make your game look unique. One of the problems of the fixed function pipeline, was the lighting was fixed, and so all games looked very similar. Big problem.

    The same problem exists if all Indies use BasicEffect. Using HLSL you can change the lighting to make your game look different to everybody elses.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 11/17/2009 10:00 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    I love HLSL

    it is one of the most satisfying and interesting technologies I have learnt
    nothing better than starting up RenderMonkey and just writing something off the top of your head
    3D trigonometry is pure mental pleasure

    and finding ways to do GPGPU with HLSL is challenging and interesting also


  • 11/17/2009 10:11 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    It's worth noting that you cannot use XNA GS and not be using HLSL. You didn't write it, but SpriteBatch and BasicEffect both leverage HLSL under the hood to do what they do. XNA GS does not support a fixed function pipeline (i.e. a world without shaders). That's how important HLSL is.
  • 11/17/2009 10:49 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    Thanks for the many answers!

    I understand that HLSL is MS (co-joined with Nvidia at one point) created technology, but does this skill translate to other areas as well? I mean, am I wasting time learning something that is proprietary to MS only and can't be transferred to anything else?
  • 11/17/2009 11:01 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    Learning is rarely a waste of time.

    The other more common shader language is GLSL and all of the concepts (along with a little bit of syntax) will transfer just fine. There's also Cg but I'm not sure how wide spread that is. And then there's assembly shaders but again I'm not sure how often that's used over a higher level language like HLSL or GLSL.
  • 11/18/2009 8:53 AM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    Also, don't just think its only useful for 3D. You can use it to great effect in 2D games.
  • 11/18/2009 10:02 AM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    Actually HLSL is entirely Microsoft, and Cg was developed by a Microsoft+NVIDIA collaboration.

    Thinking about the fact that it is proprietary to MS is the same as thinking about DirectX being proprietary to MS. Sure it is, but it is also very widely used. All shader programming for the Xbox is done in HLSL and I think it's safe to say that a large percentage of games developed for Windows use DirectX (in one form or another, either native or through XNA or some other wrapper), and thus would use HLSL for shaders.


    As far as shader programming goes, in general game development you will either use HLSL (when working with Direct3D or XNA), or GLSL (when using OpenGL), or Cg (which can be compiled into DirectX or OpenGL shaders)

    And as with normal programming languages, it's not the language that matters, it's the concepts. These 3 shader programming languages are close enough that if you learn one of them, transitioning to the others will be very easy. The syntax might be somewhat different, but if you know the concepts, you'll work it out. I often take inspiration from GLSL code and use stuff from there in my HLSL shaders.
  • 11/18/2009 10:42 AM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    I love it, and couldn't have done my game without it.  

    It may appear foreign, but I think it is relatively easy: Its just a bit lower level than what you might be accustomed to.  

    The syntax is close enough to C so as not to be a problem.  One has to get a grasp of the flow of information (application to Shader system,  vertex shader to pixel shader etc..) and how to move information between these two steps, but that is not terribly difficult.  

    The number of intrinsic functions is low, and well documented over at MSDN, so not much to worry about there.  

    For me I think of it as "easy" simply because you have a limited set of operations and you must use your imagination to accomplish what you want, which is much more fun than trying to figure out A: Whether or not something is already implemented in a .Net library somewhere and B: How to use that function.

    Best,
    Byron
    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  • 11/18/2009 5:42 PM In reply to

    Re: HLSL: How important is it? How often is it used by indie game developers?

    You aren't wasting time learning HLSL if you want to program games and work with 3D graphics.  HLSL is even applicable to some other fields, like encryption, or anything if you're clever about it.  Skills with HLSL are translatable to Cg with a small learning curve, much like an ability to program in C++ would yield some ability to program in C#, because the idea and the syntax is similar enough.
Page 1 of 1 (14 items) Previous Next