Advertisement

OpenGL cube map faces are rotated

Started by August 13, 2019 04:50 PM
16 comments, last by _Silence_ 5 years, 5 months ago

Random thoughts that cross my mind when staring at it (i have never drawn a quad, just found to programming recently):

The interesting part would be the vertex shader (if such a thing existed back in the day ?) and the view matrix.

Would it change something if you switched the vertex position ? Looks like they start in the lower left (-1/-1), what happens if you let them start in the upper left (-1/1), (-1/-1), (1/-1), (1/1). Do the images turn ?

Sorry for not being more helpful ...

Post your sampling pixel shader function, you might increase/decrease the goniometric sampling ray in other directions as for cos /sin relation.

Advertisement

I cannot share the shader code... it's a giant ray tracer, and I'm not the person who maintains it. :(

Does anyone have a small code to test the environment map?

OpenGL 4.5 ... nothing special ... in my rep ... (orf_n/Source/Applications/Skybox). And there's a whole bunch of examples out there ...

Or do you want me to check the images for you before you bother with someone else's setup ?

You gave no information about the normals. Your code snippet only shows things about your 2D colored quad. I believe @JohnnyCode spotted the main problem.

On 8/14/2019 at 5:30 PM, taby said:

Does anyone have a small code to test the environment map?

There are many tutorials on the Internet. It should take few time to check it. At least less than asking here and expecting the work to be done :)

Yes, you have me figured out... I’m lazy and I hate helping people out. :)

Advertisement
21 hours ago, taby said:

Yes, you have me figured out... I’m lazy and I hate helping people out. :)

Don't take it bad. I wasn't trying to mean anything. Just that given the fact that since we have few information, this would be best and more quick for you to check on your own side. Just copy-paste a cubemap tutorial, check it, use your texture, check it again, compare until you find something that could explain the differences.

This topic is closed to new replies.

Advertisement