glsl refraction getting mapped upside down

后端 未结 1 416
借酒劲吻你
借酒劲吻你 2020-12-31 23:26

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

相关标签:
1条回答
  • 2020-12-31 23:47

    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:


    (source: physicscentral.com)

    0 讨论(0)
提交回复
热议问题