Sign in to follow this  
clapton

CG and antialiasing

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this