Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RegularKid

Pixel Shaders?

This topic is 6017 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

Anyone know if OpenGL supports pixel shading? If so, can someone point me to a good tutorial on them. I searched Google but what I found was very advanced and over my head. Maybe there is a simple beginners tutorial on the subject? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
OpenGL Register Combiners = DirectX Pixel Shaders. I have yet to see a good introductory tutorial on Combiners, but there are a lot of examples on nVidia''s web site.

BTW, when I mean a good introductory tutorial, I mean something as simple as slapping a texture on a quad or coloring a triangle red. Most tutorials, unfortunately, focus on doing something neat and fancy right off the bat.

Share this post


Link to post
Share on other sites
quote:

OpenGL Register Combiners = DirectX Pixel Shaders.


Not exactly. register combiners + texture shaders = DX pixel shaders.

And of course OpenGL supports pixel shaders. Look up said extensions (or fragment_shader if you have an ATi card).

Share this post


Link to post
Share on other sites
Jeeky said it best:

quote:

BTW, when I mean a good introductory tutorial, I mean something as simple as slapping a texture on a quad or coloring a triangle red. Most tutorials, unfortunately, focus on doing something neat and fancy right off the bat.



Yeah. That sucks. Because to start off simple and see how they work I would want to do just that: make a triangle and a light and then use pixel shaders to light the triangle properly. Damn! I''ll check out Nvidia''s website anyways, though. Thanks.

Share this post


Link to post
Share on other sites
quote:
Original post by jeeky
OpenGL Register Combiners = DirectX Pixel Shaders. I have yet to see a good introductory tutorial on Combiners, but there are a lot of examples on nVidia''s web site.

BTW, when I mean a good introductory tutorial, I mean something as simple as slapping a texture on a quad or coloring a triangle red. Most tutorials, unfortunately, focus on doing something neat and fancy right off the bat.


Hmm I might have to do one up, using nvParse as the interface for the shaders however, so to skip on using the actual combiner functions themselves. nvParse makes it shitloads easier

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack

Share this post


Link to post
Share on other sites
Yann L--Thanks for the clarification.

Maximus--That would be great. I know I would be interested in seeing a very simple example.

Share this post


Link to post
Share on other sites
So some basic pixel shader examples I could give would be like:

1) just outputting the colour from the texture lookup to the fragment
2) blending the primary colour with the colour from the texture lookup for the fragment
3) blending the pixels from two texture unit lookups together
4) inverting the colour of returned from a texture lookup, and using that for the fragment colour

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack

Share this post


Link to post
Share on other sites
Unfortunately jeeky is right, beginner tutorials on OpenGL pixel/vertex shaders are very hard to find. And although nVidia''s (and ATi''s) developer sites are excellent resources, they are also quite advanced.

The only sites I know from the top of my head, that have some basic examples about shaders are Nutty''s Site and Delphi3D. Most people already know those sites, but mentioning them again can''t really hurt. And in case you are really stuck with a pixel/vertex shader problem, you can try out the opengl.org forums. A few guys from nVidia and ATi are posting there, so you have a direct contact to the source

Hope that helps.

/ Yann

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!