HLSL circular/spiral transition shader












0














I am developing some shaders for WPF, and so far I managed to get fadeout, and swipe shader working, but for this one, I have no idea where to start.
Could someone please hand me out a few tips on how to approach this problem?
What I am trying to achieve is the following:
HLSL desired effect



Thank you










share|improve this question
























  • I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
    – Andy
    Nov 17 at 15:53












  • I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
    – Satish Pai
    Nov 18 at 10:22


















0














I am developing some shaders for WPF, and so far I managed to get fadeout, and swipe shader working, but for this one, I have no idea where to start.
Could someone please hand me out a few tips on how to approach this problem?
What I am trying to achieve is the following:
HLSL desired effect



Thank you










share|improve this question
























  • I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
    – Andy
    Nov 17 at 15:53












  • I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
    – Satish Pai
    Nov 18 at 10:22
















0












0








0


1





I am developing some shaders for WPF, and so far I managed to get fadeout, and swipe shader working, but for this one, I have no idea where to start.
Could someone please hand me out a few tips on how to approach this problem?
What I am trying to achieve is the following:
HLSL desired effect



Thank you










share|improve this question















I am developing some shaders for WPF, and so far I managed to get fadeout, and swipe shader working, but for this one, I have no idea where to start.
Could someone please hand me out a few tips on how to approach this problem?
What I am trying to achieve is the following:
HLSL desired effect



Thank you







wpf hlsl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 at 11:37

























asked Nov 13 at 16:59









Mike

51214




51214












  • I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
    – Andy
    Nov 17 at 15:53












  • I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
    – Satish Pai
    Nov 18 at 10:22




















  • I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
    – Andy
    Nov 17 at 15:53












  • I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
    – Satish Pai
    Nov 18 at 10:22


















I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
– Andy
Nov 17 at 15:53






I've literally never written a shader myself. What you have there doesn't really look like shaders I've seen. Maybe you would do better with 4 or 5 paths and change between them. There are some shaders available which are quite tricky to find. Have you seen these youtube.com/watch?v=q60fF2rZUiU
– Andy
Nov 17 at 15:53














I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
– Satish Pai
Nov 18 at 10:22






I googled and found this archive.codeplex.com/?p=transitionals , The spiral transition shader is not available, but there are many transition which you can take help.
– Satish Pai
Nov 18 at 10:22














1 Answer
1






active

oldest

votes


















1





+100









In my opinion the easiest way to build any complicated effect is to decompose the original effect into small parts and add them together. In your case the effect consists of 3 parts:




  1. 5 rings filled after each other

  2. each ring is filled counterclockwise from the left

  3. the filling of a ring is a circle at each end


This in mind you can build a solution for each part separately and add the results together.



I assume that there will be a variable float progress; rolling from 0 to 1 which determines the progress of the transistion.



In following some starting points for each part:



For 1. you check the distance of the texture coordinate of the fragment to the center of the screen and divide the maximum distance into 5 parts. While the progress is 0 <= progress < 0.2, the first ring is visible, while 0.2 <= progress < 0.4 the second and so on.



For 2. you check the angle of the difference vector between the fragment and the center to the left vector, e.g. using atan2. Within each part (such as 0.0-0.2) you compare the local progress of the stage to the angle to determine the visibility, making the fragments appear in an angle dependent way.



The 3. might be the most tricky part, as you will have to construct the center of the progress ring ends and compute the distance to the fragment. If it is within the current ring thickness is is visible.



Hopefully this quick thoughts give you a rough starting point for your effect!






share|improve this answer





















  • Thank you, this is exactly the type of help I am looking into!
    – Mike
    Nov 22 at 16:38











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%2f53286019%2fhlsl-circular-spiral-transition-shader%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1





+100









In my opinion the easiest way to build any complicated effect is to decompose the original effect into small parts and add them together. In your case the effect consists of 3 parts:




  1. 5 rings filled after each other

  2. each ring is filled counterclockwise from the left

  3. the filling of a ring is a circle at each end


This in mind you can build a solution for each part separately and add the results together.



I assume that there will be a variable float progress; rolling from 0 to 1 which determines the progress of the transistion.



In following some starting points for each part:



For 1. you check the distance of the texture coordinate of the fragment to the center of the screen and divide the maximum distance into 5 parts. While the progress is 0 <= progress < 0.2, the first ring is visible, while 0.2 <= progress < 0.4 the second and so on.



For 2. you check the angle of the difference vector between the fragment and the center to the left vector, e.g. using atan2. Within each part (such as 0.0-0.2) you compare the local progress of the stage to the angle to determine the visibility, making the fragments appear in an angle dependent way.



The 3. might be the most tricky part, as you will have to construct the center of the progress ring ends and compute the distance to the fragment. If it is within the current ring thickness is is visible.



Hopefully this quick thoughts give you a rough starting point for your effect!






share|improve this answer





















  • Thank you, this is exactly the type of help I am looking into!
    – Mike
    Nov 22 at 16:38
















1





+100









In my opinion the easiest way to build any complicated effect is to decompose the original effect into small parts and add them together. In your case the effect consists of 3 parts:




  1. 5 rings filled after each other

  2. each ring is filled counterclockwise from the left

  3. the filling of a ring is a circle at each end


This in mind you can build a solution for each part separately and add the results together.



I assume that there will be a variable float progress; rolling from 0 to 1 which determines the progress of the transistion.



In following some starting points for each part:



For 1. you check the distance of the texture coordinate of the fragment to the center of the screen and divide the maximum distance into 5 parts. While the progress is 0 <= progress < 0.2, the first ring is visible, while 0.2 <= progress < 0.4 the second and so on.



For 2. you check the angle of the difference vector between the fragment and the center to the left vector, e.g. using atan2. Within each part (such as 0.0-0.2) you compare the local progress of the stage to the angle to determine the visibility, making the fragments appear in an angle dependent way.



The 3. might be the most tricky part, as you will have to construct the center of the progress ring ends and compute the distance to the fragment. If it is within the current ring thickness is is visible.



Hopefully this quick thoughts give you a rough starting point for your effect!






share|improve this answer





















  • Thank you, this is exactly the type of help I am looking into!
    – Mike
    Nov 22 at 16:38














1





+100







1





+100



1




+100




In my opinion the easiest way to build any complicated effect is to decompose the original effect into small parts and add them together. In your case the effect consists of 3 parts:




  1. 5 rings filled after each other

  2. each ring is filled counterclockwise from the left

  3. the filling of a ring is a circle at each end


This in mind you can build a solution for each part separately and add the results together.



I assume that there will be a variable float progress; rolling from 0 to 1 which determines the progress of the transistion.



In following some starting points for each part:



For 1. you check the distance of the texture coordinate of the fragment to the center of the screen and divide the maximum distance into 5 parts. While the progress is 0 <= progress < 0.2, the first ring is visible, while 0.2 <= progress < 0.4 the second and so on.



For 2. you check the angle of the difference vector between the fragment and the center to the left vector, e.g. using atan2. Within each part (such as 0.0-0.2) you compare the local progress of the stage to the angle to determine the visibility, making the fragments appear in an angle dependent way.



The 3. might be the most tricky part, as you will have to construct the center of the progress ring ends and compute the distance to the fragment. If it is within the current ring thickness is is visible.



Hopefully this quick thoughts give you a rough starting point for your effect!






share|improve this answer












In my opinion the easiest way to build any complicated effect is to decompose the original effect into small parts and add them together. In your case the effect consists of 3 parts:




  1. 5 rings filled after each other

  2. each ring is filled counterclockwise from the left

  3. the filling of a ring is a circle at each end


This in mind you can build a solution for each part separately and add the results together.



I assume that there will be a variable float progress; rolling from 0 to 1 which determines the progress of the transistion.



In following some starting points for each part:



For 1. you check the distance of the texture coordinate of the fragment to the center of the screen and divide the maximum distance into 5 parts. While the progress is 0 <= progress < 0.2, the first ring is visible, while 0.2 <= progress < 0.4 the second and so on.



For 2. you check the angle of the difference vector between the fragment and the center to the left vector, e.g. using atan2. Within each part (such as 0.0-0.2) you compare the local progress of the stage to the angle to determine the visibility, making the fragments appear in an angle dependent way.



The 3. might be the most tricky part, as you will have to construct the center of the progress ring ends and compute the distance to the fragment. If it is within the current ring thickness is is visible.



Hopefully this quick thoughts give you a rough starting point for your effect!







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 at 16:36









Gnietschow

2,3611921




2,3611921












  • Thank you, this is exactly the type of help I am looking into!
    – Mike
    Nov 22 at 16:38


















  • Thank you, this is exactly the type of help I am looking into!
    – Mike
    Nov 22 at 16:38
















Thank you, this is exactly the type of help I am looking into!
– Mike
Nov 22 at 16:38




Thank you, this is exactly the type of help I am looking into!
– Mike
Nov 22 at 16:38


















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f53286019%2fhlsl-circular-spiral-transition-shader%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

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?