For several hours tried to understand what I’d done incorrectly and why my beautiful cubemap integration didn’t work on linux. First and formost, it seems that on windows NVIDIA drivers fill buffer objects with zeroes. I ignored the std430 alignment rules and should’ve gotten random data every time, including tons of NaNs, however this problem showed itself only after I had started debugging the code at home. Now instead of just writing something like that:

uniform InputData
    ColorSH9 input_data;

//where ColorSH9 is:

struct ColorSH9
    vec3 rgb_coeff[9];

I need to write:

uniform InputData
    float sh_data[27];

and convert the harmonics data back and forth. Need to read the documentation about data alignment carefully, I’m sure there’s an easier way to do such things.

On a bright side, because of that problem I’ve tried NVIDIA Linux Graphics Debugger and it’s magnificently perfect. I hadn’t been so excited since my first attempt of using apitrace.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s