About Me

Hi. I'm Josh Ols. Lead Graphics Developer for RUST LTD.

Contact:
crunchy.bytes.blog[at]gmail[dot]com

View Joshua Ols's profile on LinkedIn

Meta
« Prelighting & Log-Lights (Ver. 2) | Main | Realizations and Revisions »
Thursday
Sep242009

Shader Fix?

Okay, here's where I am on the shader front. I have managed to find a potential solution, but encountered some new problems.

After tinkering with the offical Nvidia examples, I found that when using CgFX where the profiles are set to glslv and glslf it will compile and run correctly. Now I am still a bit concerned about the speed issues involved with CgFX, but it might still prove to be a usable solution.

Now I have the problem with the ATI glsl compilers. Apparently it throws a fit when you say "#extension GL_ARB_draw_buffers : require", even when it says it supports that extension. Supposedly it won't complain if it is "#extension GL_ATI_draw_buffers : require". So I may have to have some ATI-specific compiler options for Cg.

I also found out that cgGLGetLatestProfile() returns arbvp, arbfp on ATI gpus. So I would have had to force it to GLSL anyway.

I would really prefer to continue using Cg, but these problems are kind of a pain. :(

 

EDIT:

It looks like Nvidia bypassed ATI's bug with Cg 2.2, by making it so that shaders needing MRT will say "#extension GL_ATI_draw_buffers : require" instead. Since they support the extension, it will work just as well with an Nvidia GPU. While it annoys me that Nvidia had to compensate for ATI's bug, I am glad that their efforts have saved me from having to deal with it.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.