fade in/fade out transitions in citro2d

Deleted member 591971

Well-Known Member
OP
Member
Joined
Apr 10, 2022
Messages
216
Trophies
0
XP
922
alright, i am more known as a ds developer rather than 3ds but i developed on the 3ds in around 2021, i don't develop for the 3ds anymore but i now want to go back lol, i was about to make a simple game with citro2d, while i thought it would look nicer with fade in/fade out transations. Does anybody know how to do it on the 3ds? (The DS has a master brightness for top and bottom screen, so if there is something similar to that then that also works.)

edit: i might come up with something cool for the 3ds soon
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,280
Country
There is no such register. You use the GPU. One possible way is to draw a black or white quad/triangle over the entire screen area and change alpha to slowly fade in or out.
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,318
Country
Hungary
ok? i guess that works too,i do not think it is way too eficient but whatever. thanks for the idea

The 3DS doesn't have any of fixed-function hardware the GBA/DS has (well, except the GBA sound FIFO + timer --> DS SND --> 3DS CSND), so your options are sadly limited and resource-intensive.

I can only list a few options from the top of my head:
- You literally draw over the entire scene with a transparent rectangle (I do this in a GPU-composited program of mine)
- You can update the PDC LUT (0x80 and 0x84) in VBlank region to dim all pixels, but unless you're doing this in baremetal, and/or working on a techdemo/demoscene, DO NOT DO THIS IN THINGS INTENDED TO BE USED BY EVERYONE, as it will break a LOT of stuff.
- You can allocate a dimming buffer, and use the ARM11 CPU's data- and media-processing instructions to do color multiply faster (needs 0xRRGGBBAA mode to work)
- You could dim the backlight perhaps? This method is not recommended either.
- You can turn off the LCD panels themselves via an MCU command, and they will slowly fade to black :) (while this one is a joke, it is actually valid, but also not recommended either)

You can accelerate the "brute-force" methods by using Core1 (syscore) for low-impact tasks while Core0 (appcore) hammers over the pixels furiously. And let's not forget that the new3DS has two more cores, one dedicated to QTM, and the other is completely free for programmers to use. Although keep in mind the limited FCRAM bandwidth! Utilize your caches well!
 

Deleted member 591971

Well-Known Member
OP
Member
Joined
Apr 10, 2022
Messages
216
Trophies
0
XP
922
The 3DS doesn't have any of fixed-function hardware the GBA/DS has (well, except the GBA sound FIFO + timer --> DS SND --> 3DS CSND), so your options are sadly limited and resource-intensive.

I can only list a few options from the top of my head:
- You literally draw over the entire scene with a transparent rectangle (I do this in a GPU-composited program of mine)
- You can update the PDC LUT (0x80 and 0x84) in VBlank region to dim all pixels, but unless you're doing this in baremetal, and/or working on a techdemo/demoscene, DO NOT DO THIS IN THINGS INTENDED TO BE USED BY EVERYONE, as it will break a LOT of stuff.
- You can allocate a dimming buffer, and use the ARM11 CPU's data- and media-processing instructions to do color multiply faster (needs 0xRRGGBBAA mode to work)
- You could dim the backlight perhaps? This method is not recommended either.
- You can turn off the LCD panels themselves via an MCU command, and they will slowly fade to black :) (while this one is a joke, it is actually valid, but also not recommended either)

You can accelerate the "brute-force" methods by using Core1 (syscore) for low-impact tasks while Core0 (appcore) hammers over the pixels furiously. And let's not forget that the new3DS has two more cores, one dedicated to QTM, and the other is completely free for programmers to use. Although keep in mind the limited FCRAM bandwidth! Utilize your caches well!
thanks i guess, i am gonna draw a rectangle over the entire scene
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: