bo3b / 3Dmigoto

Chiri's DX11 wrapper to enable fixing broken stereoscopic effects.
Other
770 stars 122 forks source link

Too bright areas #115

Closed ghost closed 5 years ago

ghost commented 5 years ago

image I have some shaders that are making the game too brighter, how i can make the shader make the object visible without messing the texture/colors and making them visible, but not exagerately white?

I know this is unrelated to 3DMigoto, but i need help, and i can't find any! This is going for months! The game has alot of requests for a "Fullbright" mod. and the only way is modifying the shaders!

DarkStarSword commented 5 years ago

Once again, this is not the correct place to ask for help manipulating shaders. This is the issue tracker for 3DMigoto and should only be used to report bugs in the tool itself - I'm closing this issue and please refrain from opening any further reports on it. I know that you have already been pestering masterotaku for help with this issue and you might want to learn a bit of patience and recognise that we aren't here to drop everything in our own lives and help you at any time of the day and night with a problem that quite frankly none of us even care about. No one is going to remote desktop to your system and work through this - the most you can expect is a few pointers that might get you on the right path to solve this yourself.

On that note, you might want to consider some mathematical functions that scale the value non-linearly such that values close to 0.0 get boosted significantly more than values closer to 1.0. You should recall from high school mathematics that the square root function is one example of a mathematical function that with this property (ditto cubed roots etc). You should then recall that sqrt(x) is the same as x^0.5 and then note that you could change that 0.5 with any other fractional value to tune the curve to suit your needs. You should then look up the formula used in gamma corrections and be amazed that it is exactly this.

If the curves offered by that function don't suit your needs well enough, tonal curves are a more flexible approach used routinely in image manipulation, but at the cost of being significantly harder to implement in code.

DarkStarSword commented 5 years ago

BTW in the other issue report I suggested looking at ReShade rather than 3DMigoto since it is designed for injecting post processing effects, including brightness adjustments and tonal curves and ships with a set of shaders that can do everything you want. I know you are working on a VR title though, and I don't know if ReShade supports those*, but it's worth a try.

* I kind of figure ReShade would traditionally inject at the Present() call, which would not work as it would only affect the mirror window and not the image on the headset, but if they have updated the tool for explicit support for HMDs it might be able to inject at the equivalent SteamVR / Oculus API call instead. I'm not familiar enough with ReShade to know if this is the case off hand, but keep an eye out for any settings related to VR and/or the point at which it injects its effects. 3DMigoto has a similar limitation on our [Present] command list, but we can inject at many opportunities in the frame to get around this, which you are effectively doing by modifying the shaders for the surfaces and/or lighting directly. In a future version we might add support for injecting at the HMD present equivalent API directly, but there is no immediate plan for that.