Welcome, Guest.
Username: Password: Remember me

TOPIC: Uniform migration

Uniform migration 3 months 4 days ago #1

I do not know if it is possible.
This idea is make backward compatibility for effect/preset files.
Add some features to ReShade core.
  1. Add loaded value to constants if uniform value is obsoleted or it has readonly annotation.
    (Maybe it requires to everytime reload the effects if a preset has obsoleted values.)
  2. Use migrate_from annotation when load value if expression has an obsoleted uniform and it loaded from a preset.
  3. Delete obsoleted value from preset's key/value pairs after loading effects.
// Suggestion 1
uniform int OldName <
    ui_min = 1; ui_max = 8;
    readonly = true;
> = 1;
// Suggestion 2
obsoleted uniform int OldName <
    ui_min = 1; ui_max = 8;
> = 1;
uniform float NewName <
    ui_min = 0.125; ui_max = 1.0;
#ifdef OldName
    migrate_from = (float(OldName) / 8);
#endif
> = 0.125;
Last Edit: 3 months 4 days ago by seri14.
The administrator has disabled public write access.

Uniform migration 3 months 1 day ago #2

Partially implemented this feature.
github.com/seri14/reshade/commit/cb0eac7...37fa102ce59623fd1bb7

Maybe it is not required big changes.

After this commit, I will committing to experimental-uniformmigration branch.
github.com/seri14/reshade/tree/experimental-uniformmigration
Last Edit: 3 months 1 day ago by seri14.
The administrator has disabled public write access.