What's the best tool you can use to learn to program shaders?
Asked Answered
H

1

14

I've recently been doing some DirectX 10 work and I'm looking to move to DirectX 11 and Shader Model 5.0. I've written a few very simple shaders in the past and I'm looking to broaden my horizons and venture into more complex shaders. My question is sort of multi-fold:

  1. What is the best tool out there to program shaders with? I've only used visual studio and SOME FX composer - read: enough to open it up and look at it.

  2. Does the brand of gfx card effect what type of shaders you can program?

    • The reason I ask is that it seems like Nvidia has way better tools and ATI seems to have cancelled RenderMonkey. I don't seem to see any replacement for it? Am I wrong?
  3. Sort of the same question as #1, but can you use cross vendor tools if you just intend to write DirectX shaders and not vendor specific?

    • If you need to go vendor specific, does Nvidia generally have better tools? I'd really like to ATI right now, as they seem to be the best bang for the buck (and I have an AMD board) - but am hesitant becasue I mostly use my gfx cards for programming.
Hoofbeat answered 15/4, 2011 at 20:46 Comment(1)
shader-playground.timjones.io for the godbolt of shaders. www.shadertoy.com for the modern rendermonkey.Aestivation
L
8

What is your ultimate goal? If you'd just like to know a little more about shading, or if you are an artist or technical artist, then 1. FX Composer and RenderMonkey are pretty good.

If you are a programmer and you'd like to make graphics engines, then 1. you should use a text editor, because the shader is just one small part of a graphics engine. Past a certain low level of sophistication, shader constants and certain textures need to be created on-the-fly in a language like C++.

two. The brand of graphics card doesn't affect what kind of shaders you can program at all nowadays.

three. Cross-vendor tools are fine.

Though you didn't address this issue in your question, I feel I should mention: not only are shaders today just a small part of a graphics engine, but their role will diminish soon as focus shifts to deferring work until "post-processing" using "compute." A shader will soon typically output abstract terms like albedo and normal, not color. Its relevance to art will decline.

Liking answered 15/4, 2011 at 23:7 Comment(8)
Any references that will backup that last statement?Fancier
Thanks for the feedback. I'm a programmer and have pretty little artistic skill, but I'd like to mess around with concepts like bump mapping and basic shader programming. You mention a text editor, which is fine of course, but I find it annoying to close and launch my program every time I want to see a simple shader. Is there a better way around that?Hoofbeat
@Fancier What I wrote was advice from my position as a person inside the games industry. By the time what I said is common knowledge, it will be common knowledge, and there will be no need for people like me to give such advice. Wikipedia will eventually record all this stuff, five years or so after the story is over.Liking
@Hoofbeat if you're the one writing the game engine in C++ or C# or whatever, and if you're on PC or Mac, you should be able to write it so that you can reload shaders without shutting down the program. Is there some detail I'm missing?Liking
I guess I could write a custom app that lets you load shaders on the fly. I'd just hoped that I wouldn't have to do that. :(Hoofbeat
@Drakenor If you are already writing an app that loads and runs shaders, reloading them isn't that difficult, just do a reload on say 'j' key_press, or whatever other event you want. In our engine it monitors file changes for reload, but that's a bit more involved.Milky
Hey Arelius, that's a good idea. Do you guys just use a text editor?Hoofbeat
I use emacs with a modified C-mode for editing the shader, gives highlighting and indents and the like, but yeah, just a pretty standard editor. What do you feel that your standard code editor is missing?Milky

© 2022 - 2024 — McMap. All rights reserved.