Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:40:40+00:00 2026-06-14T09:40:40+00:00

I am implementing refraction in glsl. I am using the refract function provided in

  • 0

I am implementing refraction in glsl. I am using the refract function provided in frag shader to get the desired effect. But the refraction I am getting, its upside down. I think this is wrong.. any idea why is it so?

This is what I do in vertex shader:

vec3 worldView = normalize(vec3(WorldCameraPosition-worldPos));
refractor = refract(-worldView, worldNorm, Eta); // eta = 0.66;

and then frag shader I do:

vec4 refractColor = textureCube(cubeMap, refractor); 

http://www.cse.ohio-state.edu/~duttas/Images_5542/Capture.PNG http://www.cse.ohio-state.edu/~duttas/Images_5542/Capture.PNG

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:40:41+00:00Added an answer on June 14, 2026 at 9:40 am

    If you’re talking about the refractions on those spheres, I’m pretty sure what you’ve got is the correct result, it’s supposed to be upside down. Due to the way the light refracts off the spherical surface the image you see in the sphere is reversed:

    https://summerexplorations.files.wordpress.com/2011/07/marbles2.jpg?w=584

    Real world example:

    http://www.physicscentral.com/explore/pictures/images/crystal-ball_2.jpg
    (source: physicscentral.com)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When implementing a hash table using a good hash function (one where the probability
implementing publishActivity in PHP using the REST API using this code: $activity = array(
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
when implementing a recursive function during development, i will use a counter and exit
Before implementing j_security_check using MySQL realm authentication in my web app. I had the
How do I get a reference of all beans implementing a specific generic interface
I'm implementing a dynamic language that will compile to C#, and it's implementing its
Hi I need help implementing a logic using Gridview control in c#. I have
I'm using reflection to get some member names as strings. I'm using a method
Implementing a custom Dependency Property on a Framework Element object causes my Visual Studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.