Skip to content
  • Niklas Haas's avatar
    shaders: refactor variable definitions · ec6e5260
    Niklas Haas authored
    Group the variable state up into its own struct, which also includes
    metadata like whether or not the variable is dynamic.
    
    Instead of hard-coding static names for all variables, generate fresh
    identifiers and pass them around. (In theory, we could get away with
    just the `_N` variable names, but I want to keep around the
    human-friendly variable names for debugging purposes; so I went with the
    `_name_N` approach)
    
    Also change the ra_var interpretation back from column major to row
    major, to match the struct color_matrix/color_transform. This is
    probably more convenient for everybody involved, even though it makes
    `dim_m` sort of weird. The new helper functions should hopefully make
    that less painful anyway.
    
    As an aside, fixes a bug where the wrong luma coefficients were used for
    the inverse OOTF. Annoyingly, this makes it harder to detect when
    src_luma/dst_luma are required, so just always load the uniforms again.
    (It's not like it matters)
    ec6e5260