CG and antialiasing

Started by
2 comments, last by clapton 18 years, 5 months ago
Hello! I've came across the following issue - I am doing a simple per fragment lighting of a mesh using CG shaders. Unfortunately, the result appears to be pretty jagged. What I wanted to do was to turn on GL blending and use antialiasing. But hey! It won't for me since I process all fragments in a shader. At least that's how it is when I tried it. So, my question actually changes to - how can I use blending (thus, GL antialiasing) together with fragment shaders? I know that this question might be lame but I've just started playing around with CG. Thanks in advance!
___Quote:Know where basis goes, know where rest goes.
Advertisement
... hmm. I must have missed something before because now color blending works. ;)
___Quote:Know where basis goes, know where rest goes.
Alpha blending is completely separate from fragment shaders, so you use it just like you would if you were using the fixed-function fragment stage.
Quote:Original post by Kalidor
Alpha blending is completely separate from fragment shaders, so you use it just like you would if you were using the fixed-function fragment stage.


Obviously. I found out that I messed something up when using GL's blending functions. :)

Anyway, from what I experienced yesterday, my problem still remains unsolved. Does GL_LINE_SMOOTH work when using fragment shaders? I can see no difference between scenes without and with blending and GL_LINE_SMOOTH enabled. Where does antialiasing takes place? After fragment processing or somewhere else?

Thanks
___Quote:Know where basis goes, know where rest goes.

This topic is closed to new replies.

Advertisement