Emulator Issues #726
closedGamma setting has no effect
0%
Description
What steps will reproduce the problem?
- Start RE1-0 (for example)
- Go in the Video Settings
- 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*)
Updated by TTnickTT over 15 years ago
did you try putting your screen gamma higher or your main gamma from windows/linux/mac.
Updated by zantezuken over 15 years ago
Lol, yes, of course. It was the first thing which i'd tried.
Obvious, isn't?
Updated by omegadox over 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.
Updated by XTra.KrazzY over 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.
Updated by zantezuken over 15 years ago
Strange question... Dolphin is an emulator, right?
May be I did miss something...
Updated by XTra.KrazzY over 15 years ago
zantezuken: Imagine even MORE lines of code executing between each frame. It can
severely slow down the emulation.
Updated by XTra.KrazzY over 15 years ago
Change your gamma settings inside the GFX card driver, dammit.
Updated by XTra.KrazzY over 15 years ago
- Status changed from Questionable to Won't fix
Updated by zantezuken over 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.
Updated by death2droid over 15 years ago
Why would you need hacked GFX drivers XD
Dolphin runs fine and the Gamma thing isn't even a real problem.
Updated by zantezuken over 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!"
Updated by zantezuken over 15 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
Updated by skidau over 12 years ago
Issue 5354 has been merged into this issue.
Updated by Sonicadvance1 almost 12 years ago
Issue 5379 has been merged into this issue.
Updated by pauldacheez over 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
Updated by degasus over 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.
Updated by skidau over 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.
Updated by NeoBrainX over 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).
Updated by NeoBrainX over 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.
Updated by skidau over 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.
Updated by NeoBrainX over 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? :)
Updated by JMC4789 over 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.
Updated by JMC4789 over 10 years ago
Updated by phire about 9 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.
Updated by phire about 9 years ago
Confirmed, BPMEM_COPYFILTER0/1 is changing when you adjust the gamma.
Updated by phire over 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.
Updated by leoetlino over 6 years ago
- Status changed from Accepted to Fixed
- Fixed in set to 5.0-7151
Updated by pokechu22 over 2 years ago
- Related to Emulator Issues #12974: Brightness controls do not work in some games added