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

  • SEARCH
  • Home
  • 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 7937651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:34:28+00:00 2026-06-03T22:34:28+00:00

doing a textureCube() texturelookup in GLSL takes the reflectionray as lookup coordinate. GLSL 4.2

  • 0

doing a textureCube() texturelookup in GLSL takes the reflectionray as lookup coordinate.

GLSL 4.2 introduced imageLoad/imageStore that aparently also works with cubemaps.

But the load/store functions

imageStore(gimagecube image, ivec3 p, vec4 data) 

take integer coordinates to access the respective texel.

How are those coordinates interpreted and how can they be calculated based onthe direction of the reflection ray?

  • 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-03T22:34:30+00:00Added an answer on June 3, 2026 at 10:34 pm

    Basically, cube-maps with image load/store work like a 6-element array texture. The z-component of the texture coordinate specifies which face to look at. The order of the faces is the same order as the enumerators for cube map faces, which is the same as for layered rendering.

    As for how to calculate them for a direction, you can do that by using the algorithm detailed in the spec. Section 3.9.10 of GL 4.2 core explains how OpenGL takes a direction and converts it into a particular face and texture coordinate. It’s a bit more complex than I’d want to explain in a post, and it would really just be a copy-and-paste of some text.

    The general idea is that the largest component defines which face to use, based on table 3.17. The S and T texture coordinates are then taken from that table, and a little math is applied to them to convert them into [0, 1] texture coordinates.

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

Sidebar

Related Questions

Doing a custom Tumblr theme that will have a mix of the usual Tumblr
Doing a Google search I found several command-line SCEP clients that I can download
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing a search using django-sphinx gives me results._sphinx that says there were 68 results,
Doing this works in IE7: <a href= target=_blank>Link</a> But in IE8 it open a
Doing a small project I have received some Java code that I should rewrite
Doing some code reviews lately I came across a number of classes that have
doing some jQuery animation for a high profile client that has to be finished
When doing Rails development, and shen using debugger it often happens that step leads
Doing a little search i realized that to make an equalizer. I need to

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.