GLSL - draw image with equirectangular projectionHow to debug a GLSL shader?Using both phong and textures in glslpitch yaw roll, angle independencyCalculate distortion in equirectangular projection on a sphereWrite to texture GLSLHow to draw orthographic projection from equirectangular projectionSimple GLSL render chain doesn't draw reliablyOpenGL : Rotate using roll pitch and yaw valuesInterpolate Color in GLSL Raytracerhow to return the mask of sampled pixels

A Magic Diamond

How do I answer an interview question about how to handle a hard deadline I won't be able to meet?

What's a good pattern to calculate a variable only when it is used the first time?

Problem with GFCI at start of circuit with both lights and two receptacles

"sh -c" does not expand positional parameters, if I run it from "sudo --login". Is there a way around this?

Quick destruction of a helium filled airship?

What should I do with the stock I own if I anticipate there will be a recession?

What ways are there to share spells between characters, besides a Ring of Spell Storing?

Airline power sockets shut down when I plug my computer in. How can I avoid that?

How would armour (and combat) change if the fighter didn't need to actually wear it?

Why do aircrafts leave cruising altitude long before landing just to circle?

Is a USB 3.0 device possible with a four contact USB 2.0 connector?

What is the opposite of "hunger level"?

I was dismissed as a candidate for an abroad company after disclosing my disability

Will some rockets really collapse under their own weight?

Are there liquid fueled rocket boosters having coaxial fuel/oxidizer tanks?

Has the speed of light ever been measured in vacuum?

Have there ever been other TV shows or Films that told a similiar story to the new 90210 show?

global variant of csname…endcsname

What is the fastest way to level past 95 in Diablo II?

What is the question mark?

Why does "auf der Strecke bleiben" mean "to fall by the wayside"?

What would cause a nuclear power plant to break down after 2000 years, but not sooner?

Why is the battery jumpered to a resistor in this schematic?



GLSL - draw image with equirectangular projection


How to debug a GLSL shader?Using both phong and textures in glslpitch yaw roll, angle independencyCalculate distortion in equirectangular projection on a sphereWrite to texture GLSLHow to draw orthographic projection from equirectangular projectionSimple GLSL render chain doesn't draw reliablyOpenGL : Rotate using roll pitch and yaw valuesInterpolate Color in GLSL Raytracerhow to return the mask of sampled pixels






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to add a "sticker" on an equirectangular image.



The parameters I have are the angle of the sticker (yaw, pitch, roll), and its size in pixels, and the equirectangular image size (always a 2:1 ratio).



Example with this sticker (don't mind the background) :



enter image description here



If we put the sticker at the bottom of the sphere, the shader should be able to get something like this :



enter image description here










share|improve this question





















  • 2





    I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

    – HolyBlackCat
    Mar 27 at 13:47











  • Shadertoy reference: shadertoy.com/view/MlfSz7

    – Ramil Kudashev
    Mar 28 at 9:33











  • @HolyBlackCat Thanks a lot I will have a look at ray tracing

    – Xys
    Mar 28 at 13:20











  • @mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

    – Xys
    Mar 28 at 13:23











  • when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

    – nabr
    Apr 1 at 18:55

















1















I'm trying to add a "sticker" on an equirectangular image.



The parameters I have are the angle of the sticker (yaw, pitch, roll), and its size in pixels, and the equirectangular image size (always a 2:1 ratio).



Example with this sticker (don't mind the background) :



enter image description here



If we put the sticker at the bottom of the sphere, the shader should be able to get something like this :



enter image description here










share|improve this question





















  • 2





    I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

    – HolyBlackCat
    Mar 27 at 13:47











  • Shadertoy reference: shadertoy.com/view/MlfSz7

    – Ramil Kudashev
    Mar 28 at 9:33











  • @HolyBlackCat Thanks a lot I will have a look at ray tracing

    – Xys
    Mar 28 at 13:20











  • @mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

    – Xys
    Mar 28 at 13:23











  • when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

    – nabr
    Apr 1 at 18:55













1












1








1


0






I'm trying to add a "sticker" on an equirectangular image.



The parameters I have are the angle of the sticker (yaw, pitch, roll), and its size in pixels, and the equirectangular image size (always a 2:1 ratio).



Example with this sticker (don't mind the background) :



enter image description here



If we put the sticker at the bottom of the sphere, the shader should be able to get something like this :



enter image description here










share|improve this question
















I'm trying to add a "sticker" on an equirectangular image.



The parameters I have are the angle of the sticker (yaw, pitch, roll), and its size in pixels, and the equirectangular image size (always a 2:1 ratio).



Example with this sticker (don't mind the background) :



enter image description here



If we put the sticker at the bottom of the sphere, the shader should be able to get something like this :



enter image description here







opengl geometry glsl 360-degrees 360-virtual-reality






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 2 at 16:32







Xys

















asked Mar 27 at 12:29









XysXys

3583 silver badges20 bronze badges




3583 silver badges20 bronze badges










  • 2





    I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

    – HolyBlackCat
    Mar 27 at 13:47











  • Shadertoy reference: shadertoy.com/view/MlfSz7

    – Ramil Kudashev
    Mar 28 at 9:33











  • @HolyBlackCat Thanks a lot I will have a look at ray tracing

    – Xys
    Mar 28 at 13:20











  • @mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

    – Xys
    Mar 28 at 13:23











  • when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

    – nabr
    Apr 1 at 18:55












  • 2





    I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

    – HolyBlackCat
    Mar 27 at 13:47











  • Shadertoy reference: shadertoy.com/view/MlfSz7

    – Ramil Kudashev
    Mar 28 at 9:33











  • @HolyBlackCat Thanks a lot I will have a look at ray tracing

    – Xys
    Mar 28 at 13:20











  • @mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

    – Xys
    Mar 28 at 13:23











  • when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

    – nabr
    Apr 1 at 18:55







2




2





I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

– HolyBlackCat
Mar 27 at 13:47





I suggest using raytracing. If I understand the wikipedia page on equirectangular projection correctly, you can easily get ray directions from image coordinates (ray_yaw = x / image_w * 2 * pi and ray_pitch = (y + image_h/2) / image_h * pi or something similar). Then for each ray you just need to find a point where (and if) it intersects your quad (the math should be relatively easy to google).

– HolyBlackCat
Mar 27 at 13:47













Shadertoy reference: shadertoy.com/view/MlfSz7

– Ramil Kudashev
Mar 28 at 9:33





Shadertoy reference: shadertoy.com/view/MlfSz7

– Ramil Kudashev
Mar 28 at 9:33













@HolyBlackCat Thanks a lot I will have a look at ray tracing

– Xys
Mar 28 at 13:20





@HolyBlackCat Thanks a lot I will have a look at ray tracing

– Xys
Mar 28 at 13:20













@mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

– Xys
Mar 28 at 13:23





@mlkn Thanks this link is very interesting. In the shader you linked, the image "covers" all the sphere, do you know how I could place the image at a certain place on the sphere, not on the whole object ?

– Xys
Mar 28 at 13:23













when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

– nabr
Apr 1 at 18:55





when you know your sticker size and you want something simple you can experiment with texture projection on a sphere; created a little playground for experiment (hope it is useful) shadertoy.com/view/3dBSzy

– nabr
Apr 1 at 18:55












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377237%2fglsl-draw-image-with-equirectangular-projection%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377237%2fglsl-draw-image-with-equirectangular-projection%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현