Where to start shader?
category: code [glöplog]
If you want "the best" way, something that everybody agrees is the best for all intents and purposes, and with 0% probability of having to reconsider and regret the choice, then I'll let someone wiser find that alternative for you. My way worked for me, YMMV.
I necessarily want the best way possible way because that doesn't exist. I want one good way and I want to stay away from all the bad ways.
I'll download iq's example.
Thanks for the advice.
I'll download iq's example.
Thanks for the advice.
*I dont necessarily want the best way possible way because that doesn't exist. (why do I have to forget whole words?)
I still use RenderMonkey for prototyping shaders from time to time - it feels very comfortable for some things.
OpenGL + shaders is a mess to learn from random internet resources, having people around whom you can ask specific questions is a million times more fruitful, and probably what has taught me the most. And then a great class in Real Time Rendering where I learned "advanced" stuff without the "basics".
There is so much bullshit out there about OpenGL... I remember looking through a slide the other day because I needed to understand perspective projections better, and it was really great and very helpful. Suddenly, on the last page listing "pros" and "cons" between gluPerspective and glFrustum, it was stated that gluPerspective renders more because it is pyramid-stub shaped, and glFrustum is box-shaped. Which is utter BULLSHIT.
I find it really simple once you get the idea, though, and get into the naming schemes of things. It's really serial. Load data from A, feed it into texture T, load data from Q, feed it into Buffer B, bind and use buffer B as a vertex attribute array for shader S, blah blah.
TL;DR: Get in touch with someone who are better than you and ask specific questions.
There is so much bullshit out there about OpenGL... I remember looking through a slide the other day because I needed to understand perspective projections better, and it was really great and very helpful. Suddenly, on the last page listing "pros" and "cons" between gluPerspective and glFrustum, it was stated that gluPerspective renders more because it is pyramid-stub shaped, and glFrustum is box-shaped. Which is utter BULLSHIT.
I find it really simple once you get the idea, though, and get into the naming schemes of things. It's really serial. Load data from A, feed it into texture T, load data from Q, feed it into Buffer B, bind and use buffer B as a vertex attribute array for shader S, blah blah.
TL;DR: Get in touch with someone who are better than you and ask specific questions.
My general method of learning is:
- do not be afraid of TRYING SOMETHING ;)
- after you've tried to do SOMETHING, then you'll have a much better understanding of how-to guides and other people's opinions
I mean, learning is an iterative development process, not a waterfall project.
- do not be afraid of TRYING SOMETHING ;)
- after you've tried to do SOMETHING, then you'll have a much better understanding of how-to guides and other people's opinions
I mean, learning is an iterative development process, not a waterfall project.
Waterfall is incremental, so it might work
mus6k, I bought The Orange Book, read it cover to cover, printed out a list of shader instructions, tried to work out several parts of graphics theory from scratch... and had an awful time.
better way: find something that works. Fuck with it. Note patterns. Go look up the things you fucked with, and find better/more comprehensive collections of them. Lather rinse repeat until you're state of the art.
better way: find something that works. Fuck with it. Note patterns. Go look up the things you fucked with, and find better/more comprehensive collections of them. Lather rinse repeat until you're state of the art.
it would be great to see some tutorial - how to create vertex and fragment shader.
i mean assembler or PB.
i mean assembler or PB.
It's just a few API calls. Surely you can do that from assembler or PB if you know how to program with them?
Quote:
It's just a few API calls. Surely you can do that from assembler or PB if you know how to program with them?
of course, i am. all i want to know is an order of "API calls"
I recommend reading Iq's intro framework's sources, particularly "i4k_OGLShader", because it has a clear but minimal set of code for setting up vertex and fragment shaders.
@yzi: thanks!
http://www.youtube.com/watch?v=ocH_7uKTeYA
ok, where to start? IDE?
ok, where to start? IDE?