Archived

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

robirt

Fragment shader?

Recommended Posts

Unfortunately, i dont know what a register combiner is. I would be happy if you tell me. I have no experience with shaders, but I am trying to learn. so is it like a pixel shader then? if not, how would that be different.
Also, if anyone knows of some articles or tutorials for shaders in opengl that isnt only nvidia.(I like nvidia, but I want to support everything) Right now my only resource is the opengl 2 specifications. Thanks.

Share this post


Link to post
Share on other sites
A fragment is a point on an object in a 3d scene. Fragments from the scene are projected onto the xy-plane to determine the pixels on your screen. Or something like that.

quote:
if anyone knows of some articles or tutorials for shaders in opengl that isnt only nvidia.(I like nvidia, but I want to support everything)

ATI has a demo on useing EXT_vertex_shader here. I think that''s about it.

Share this post


Link to post
Share on other sites
fragment in opengl normally means colour
eg
glLine
glCOlor3f(1,0,0); vertA
glCOlor3f(1,1,0); vertB

thus the fragment colour at vertA is red and half way between the 2 is (1,0.5,0)

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
I found this.

"Fragments consist of pixel location in framebuffer, color, texture coordinates, and depth (z buffer). Depending on the shading mode, vertex attributes are either interpolated across the primitive to all fragments (smooth shading), or all fragments are assigned the same values based on one vertex''s attributes (flat shading)."

So, Im wondering, are fragment shaders the same as pixel shaders? if not how are fragment shaders different from pixel shaders?

Share this post


Link to post
Share on other sites
A fragment is a color of a pixel on a polygon. Fragment Shaders are the same as Pixel Shaders they both do operations on every pixel of a give polygon.

Share this post


Link to post
Share on other sites
ever seen a so called ''pixel shader'' extension in OpenGL ?

Now you know why, it''s cause it''s called Fragment Shaders in OpenGL.

BTW a fragment is not a pixel it''s a bunch of them.

-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
a fragment is the smallest singular unit the hardware can rasterise (aka, pixel). Fragment shaders just a way of programming the graphics pipeline, more or less for per-pixel transformations. Vertex shaders are the same, only they work on vertices, and are per vertex. Only useful for fast snazzy graphical touches.

Share this post


Link to post
Share on other sites
my bad a fragment isn't a bunch or pixels, but neither is it a pixel

After rasterization stage (including texturing and fog), the data are not yet pixels, but are fragments.
Each fragment has coordinates data that corresponds to a pixel, as well as color and depth values.

So it's more than a single color value, its the whole set of informations for a final pixel.

*- edit -*
How the hell have I not seen that someone already said it ?
I guess I won't post when tired.

-* So many things to do, so little time to spend. *-


[edited by - Ingenu on September 7, 2002 10:17:58 AM]

Share this post


Link to post
Share on other sites