Project

General

Profile

Actions

Emulator Issues #726

closed

Gamma setting has no effect

Added by zantezuken about 15 years ago. Updated almost 6 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-7151

Description

What steps will reproduce the problem?

  1. Start RE1-0 (for example)
  2. Go in the Video Settings
  3. Try to adjust brightness

What is the expected output? What do you see instead?
Image should be brighter.
Nothing happens.

What version of the product are you using? On what operating system?
r2619 (doesn't matter actually, it's can be r*)


Related issues 3 (1 open2 closed)

Related to Emulator - Emulator Issues #12974: Brightness controls do not work in some gamesNew

Actions
Has duplicate Emulator - Emulator Issues #5354: Brightness Setting Broken, Game is too bright (The Last Story)Duplicate

Actions
Has duplicate Emulator - Emulator Issues #5379: Brightness control broken in Pandora's TowerDuplicate

Actions
Actions #2

Updated by TTnickTT about 15 years ago

did you try putting your screen gamma higher or your main gamma from windows/linux/mac.

Actions #3

Updated by zantezuken about 15 years ago

Lol, yes, of course. It was the first thing which i'd tried.
Obvious, isn't?

Actions #4

Updated by omegadox about 15 years ago

  • Status changed from New to Accepted

Prolly doesn't work because this might be something we have to implement. I know
copy EFB on the real HW can apply gamma to the image which we don't do in Dolphin.

Actions #5

Updated by XTra.KrazzY almost 15 years ago

  • Status changed from Accepted to Questionable

A little bit of information here:

Copying from the EFB to the XFB can include filtering on the way. Those filters (from
what we know) are only gamma correction.

I don't really know whether this is a feature that we actually need to emulate.

Actions #6

Updated by zantezuken almost 15 years ago

Strange question... Dolphin is an emulator, right?
May be I did miss something...

Actions #7

Updated by death2droid almost 15 years ago

Yes dolphin is a emulator!

Actions #8

Updated by XTra.KrazzY almost 15 years ago

zantezuken: Imagine even MORE lines of code executing between each frame. It can
severely slow down the emulation.

Actions #9

Updated by XTra.KrazzY almost 15 years ago

Change your gamma settings inside the GFX card driver, dammit.

Actions #10

Updated by XTra.KrazzY almost 15 years ago

  • Status changed from Questionable to Won't fix
Actions #11

Updated by zantezuken almost 15 years ago

Great solution. Now we just wait for the times when we NEED to use a hacked GFX
drivers with Dolphin.
Nice way for emulation progress, indeed.

Actions #12

Updated by death2droid almost 15 years ago

Why would you need hacked GFX drivers XD
Dolphin runs fine and the Gamma thing isn't even a real problem.

Actions #13

Updated by zantezuken almost 15 years ago

You miss the point. I was being sarcastic about emulation way (if we can call that
way an "emulation") of Dolphin.
It is like:
"Why do we need to proper emulate videosystem? Better to change gamma settings in
drivers!"
and more:
"Why do we need to hard work to emulate this and that? Go and buy wii/gc and don't
bother us with your stupid questions!"

Actions #14

Updated by zantezuken over 14 years ago

r3927 convo:

Comment by Sonicadvance1, Yesterday (39 hours ago)
I guess it not working at all is better than it working better, even if it could
cause some problems

Comment by nakeee, Yesterday (37 hours ago)
hacky code is always an issue

Comment by ChaosCode, Yesterday (37 hours ago)
But it works. Its better then what they had. We can use this till someone else does
better.

Nuff said. Looks like we have here a set of "allowed" and "disallowed" hacks.
<3 double standarts and duplicity

Actions #15

Updated by skidau about 12 years ago

  • Status changed from Won't fix to Accepted
Actions #16

Updated by skidau about 12 years ago

Issue 5354 has been merged into this issue.

Actions #17

Updated by Sonicadvance1 over 11 years ago

Issue 5379 has been merged into this issue.

Actions #18

Updated by Billiard26 about 11 years ago

  • Issue type set to Bug
Actions #19

Updated by pauldacheez about 11 years ago

I think the issue here is that lack of gamma/brightness emulation hasn't actually caused any major issues in games (and brightness sliders aren't major), so, as cool as accurate emulation is, the devs don't want to implement a feature just to have it slow games down and potentially break other things.

So, I guess we just need to find a game that's actually broken without proper gamma. :P

Actions #20

Updated by degasus about 11 years ago

When does the GC do gamma correction? I don't think it's done in rendering progress, so it isn't importend for any game.
But maybe it's done on efb->xfb, so a game could use it (but I don't think so), but this easy to implement in real xfb.
Next location is XFB to screen blit, so no game is available so see the results. This is also not hard to emulate but not needed at all.

Actions #21

Updated by skidau about 11 years ago

I took a quick look at this a few weeks ago and I think it is performed by BPStructs.cpp in this section:

// ----------------------------------
// Display Copy Filtering Control - GX_SetCopyFilter(u8 aa,u8 sample_pattern[12][2],u8 vf,u8 vfilter[7])
// Fields: Destination, Frame2Field, Gamma, Source
// ----------------------------------
case BPMEM_DISPLAYCOPYFILER:   // if (aa) { use sample_pattern } else { use 666666 }
case BPMEM_DISPLAYCOPYFILER+1: // if (aa) { use sample_pattern } else { use 666666 }
case BPMEM_DISPLAYCOPYFILER+2: // if (aa) { use sample_pattern } else { use 666666 }
case BPMEM_DISPLAYCOPYFILER+3: // if (aa) { use sample_pattern } else { use 666666 }
case BPMEM_COPYFILTER0:        // if (vf) { use vfilter } else { use 595000 }
case BPMEM_COPYFILTER1:        // if (vf) { use vfilter } else { use 000015 }

Specifically the COPYFILTER0 and COPYFILTER1. The next step would have been to write a quick test program on real hardware but I haven't found the time for that.

Actions #22

Updated by NeoBrainX about 11 years ago

Copy filtering is used for antialiasing, only, and irrelevant for gamma correction. As far as I know, the register values are completely ignored unless AA is enabled.

The BPMEM_TRIGGER_EFB_COPY setting has a field for gamma correction; the GC GPU only supports three possible gamma correction coefficients (1.0, 1.7 and 2.2).

Actions #23

Updated by NeoBrainX about 11 years ago

I think I need to correct myself a bit: The DISPLAYCOPYFILTER registers are the ones which are used for AA only; COPYFILTER is likely used for EFB->XFB copies (since vertical stretching is done there). I don't recall having any gamma field in those registers, however.

Actions #24

Updated by skidau about 11 years ago

From what I could see, the Resident Evil games have enabled AA as they allowed a user configurable gamma setting of 0 to 255 (iirc?). I am aware of the three value EFB COPY one though - it isn't used by the game in this issue.

Actions #25

Updated by NeoBrainX about 10 years ago

If that is indeed true, it would be greatly helpful two have a few fifo logs, each recorded in the same scene but with a different gamma setting. Three logs would be sufficient I guess - using the highest setting, the lowest setting and the default setting (or the "medium" setting if default was one of the former two).

CC JMC? :)

Actions #26

Updated by JMC4789 about 10 years ago

I've seen gamma work in other games, but it indeed doesn't function here. fifologs will work for this, then you shall get fifologs.

Actions #28

Updated by phire over 8 years ago

  • Assignee set to phire

It occurs to me that a game could abusing the AA/Deflicker filtering to implement a brightness filter during the EFB to XFB copy. It is intended that games would use filter coefficients that add up to 100%, but if a game was to use coefficients that added up to less than 100% you would get a less-bright image.

I need to test this theory.

Actions #29

Updated by phire over 8 years ago

Confirmed, BPMEM_COPYFILTER0/1 is changing when you adjust the gamma.

Actions #30

Updated by phire almost 8 years ago

I've implemented this for video software in PR 3845.

It's been tested and the brightness slider works. A hardware implementation will follow.

Actions #31

Updated by leoetlino almost 6 years ago

  • Status changed from Accepted to Fixed
  • Fixed in set to 5.0-7151
Actions #32

Updated by pokechu22 almost 2 years ago

Actions

Also available in: Atom PDF