Jump to content
  • Advertisement
Sign in to follow this  
taby

OpenGL cube map faces are rotated

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites
Posted (edited)

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?

Edited by taby

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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 :)

Share this post


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

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  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!