Jump to content
  • Advertisement
Sign in to follow this  
MatthewDiaz

Scene Transitioning Solutions

This topic is 2459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If for example from the beginning publisher screen I want to fade out to black and then fade in from black to the title screen what are some ways to go about doing it? My knowledge of Directx 11 is limited and so I could think of only one solution. I could make simply 5 different screen foregrounds the same shade of black but with 5 different shades for the alpha channels. Then just draw them in sequence. I thought to myself it seems to be a simple solution that would work in my mind, but then I am thinking that this is probably not the way the professionals do it. My question is if this isn't the orthodox way do you have a problem with that solution regardless? Also if you do have a problem with it could you talk me through a better solution please?

Share this post


Link to post
Share on other sites
Advertisement
I would do this way (I actually don't know if this is the best approach):

1- Clear the screen black or with any other color u wish to fade to.
2- draw the publisher image with opacity decreasing each loop.
3- when it reaches to zero, begin drawing the title screen with opacity increasing within each loop.

I hope it helps.

Share this post


Link to post
Share on other sites
Draw a full-screen untextured quad over the scene, with it's rgb set to 0 and it's alpha to a time-based value, doing a SRC_ALPHA/INV_SRC_ALPHA blend.

Share this post


Link to post
Share on other sites
Interesting what you are trying to do. I have not done anything like this before, but if I were, I would use shaders to do so. Using a full screen quad and a timer variable, you can transition all pixels(left to right, ect...) to black over a period of time.

Share this post


Link to post
Share on other sites
I am still trying to get my head wrapped around HLSL. Today I tried to get a constant buffer working that would change the color of an untextured quad but I simply can't get it working right now. Tomorrow I am going to try to find some tutorials that explain things better.

Share this post


Link to post
Share on other sites
I got it working. I was updating the vertex shader(vssetconstantbuffers) with the constant buffer instead of the pixel shader. Thank you guys for this solution. The research helped me to understand constant buffers and the HLSL better. I am actually excited.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!