Jump to content
  • Advertisement
Sign in to follow this  
clapton

CG and antialiasing

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

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
Advertisement
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!