Zitat: 1) What kind of shader should i use glsl or some low level arb fp1.0 shader? But more importantly how does color calculation work in a fragment shader do i have x,y and are these relative to the screen? How would i relate that the 2d shape being rendered? You should use GLSL. Even my old ATI Radeon 9800Pro was able to handle that.
I think the GLSL tutorial is a good start. The fragmentshader is executed for each fragment (pixel) you render. Colors work simply be assigning a color to gl_FragColor. In fragment shader you can access window coords of the current fragment using gl_FragCoord.xy. In case you need the window size, you will need to use an uniform variable for that. If you require world coordinates for your computation, you can use a varying from the vertexshader.
Zitat: 2) Also how do i pass the both colors to the fragment shader?
You could either use vertex attributes (simply store colors in texture coords) or use uniform variables. The third way would be a texture. You can do arbitrary texture accesses in shaders, so you can use an texture as array.
Edit:
@Lord Horazont: variant => varying ??
|