Skip to content

Changed sonic colors texture definitions - #5

Closed
FrankyBuster wants to merge 9 commits into
iwubcode:blurry_bloomfrom
FrankyBuster:patch-1
Closed

FrankyBuster wants to merge 9 commits into
iwubcode:blurry_bloomfrom
FrankyBuster:patch-1

Conversation

@FrankyBuster

Copy link
Copy Markdown

It appears that if you have the same texture definitions set multiple times the blur will be applied more than once on the same steps, so removing the duplicates makes the blur be applied the right amount of times making it look better and more accurate.

this is with the duplicates
image

and this is without
image

iwubcode and others added 9 commits December 27, 2025 13:12
…a Material, rename previous EFB action as 'BeforeEFB'
…to get a Material for post processing, this material does not have a UID which is needed for drawing, and handles slightly differently during the processing/compilation step
…tion that provides a custom material, update the EFB with the material
… based on resolution using a custom material, expose bloom brightness and the amount of spread through parameters (not exposed in the UI yet). Original shader logic by TryTwo, reworked for graphics mods and cleaned up. Consider a guassian function with kernel in the future.

Co-authored-by: TryTwo <taolas@gmail.com>
removed duplicate definitions to make the blur be applied less times
@iwubcode
iwubcode force-pushed the blurry_bloom branch 2 times, most recently from 44830d1 to cb26208 Compare January 31, 2026 03:54
@iwubcode iwubcode closed this Jan 31, 2026
iwubcode pushed a commit that referenced this pull request Nov 2, 2026
This replaces the old instruction sequence with one that is considerably
shorter. Main ideas are as follows:

 - Use AND with constant mask to isolate the needed bits.
 - Use ORR + LSL/LSR to shift the bits into position and combine in one
   instruction where possible.
 - Red and blue are already sequential, so don't need to wait for the
   byteswap. This is especially handy for red, where the bits are
   already where they need to be.
 - Red and blue can be expanded from 5 to 8 bits together.

Before:

ldurh  w14, [x0, #0x1]
rev16  w14, w14
and    w15, w14, #0x1f
orr    w15, wzr, w15, lsl #3
orr    w15, w15, w15, lsr #5
orr    w16, wzr, w15, lsl dolphin-emu#16
ubfx   w15, w14, #5, dolphin-emu#6
orr    w15, wzr, w15, lsl #2
orr    w15, w15, w15, lsr dolphin-emu#6
orr    w16, w16, w15, lsl dolphin-emu#8
ubfx   w15, w14, dolphin-emu#11, #5
orr    w16, w16, w15, lsl #3
orr    w16, w16, w15, lsr #2
orr    w16, w16, #0xff000000
str    w16, [x1, #0xc]

After:

ldurh  w14, [x0, #0x1]
rev16  w15, w14
bfi    w14, w14, dolphin-emu#11, dolphin-emu#13
and    w16, w14, #0xf800f8
and    w14, w14, #0xe000e0
orr    w16, w16, #0xff000000
orr    w16, w16, w14, lsr #5
and    w14, w15, #0x7e0
and    w15, w15, #0x600
orr    w14, w14, w15, lsr dolphin-emu#6
orr    w16, w16, w14, lsl #5
str    w16, [x1, #0xc]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants