UI_Spacer (blankspace for visual UI organization)

  • Posts: 137
1 year 3 months ago - 1 year 3 months ago #1 by TreyM
Just a simple proposal. It doesn't even have to be an integer or anything like shown below (that's just how I do it on ENB)
uniform int spacer1 < ui_type = "blank"; > =  0.0;

In theory, you wouldn't even need to specify min/max values. (Maybe not even a default value?) As long the int is set to "ui_type" blank, you would just render it as a blank spacer on the UI with nothing to tweak and no label.

If you added this, I could just update my macros to do something like:
UI_SPACER(1)

Please Log in or Create an account to join the conversation.

  • Posts: 3671
1 year 3 months ago #2 by crosire
I'd rather want to avoid adding dummy variables that don't do anything, since they'll just bloat constant buffer memory for no real reason. But I could add something to specify spacing on existing variables, so that space is inserted right before or after them. Maybe something like the following?:
uniform float foobar < ui_type = "slider"; ui_spacing = "before"; > = 0;
The following user(s) said Thank You: TreyM

Please Log in or Create an account to join the conversation.

  • Posts: 137
1 year 3 months ago #3 by TreyM
That's a fantastic idea and is much better than making a dummy variable.

Please Log in or Create an account to join the conversation.

  • Posts: 3671
8 months 4 weeks ago #4 by crosire
This is implemented now with a "ui_spacing" annotation which specifies how many lines of space to add before the variable widget.
uniform float foobar < ui_type = "slider"; ui_spacing = 2; > = 0;
This would add 2 lines of space for example.

Please Log in or Create an account to join the conversation.

  • Posts: 154
8 months 4 weeks ago #5 by seri14
I think good to implement the same spacing rules for all effects.

Example:
* Redesign category style.
* Add the option "More spacing" it does add space to some common GUI process where Shader Developers wanted to add spacing.

or add option "Disable UI spacing"

Please Log in or Create an account to join the conversation.

  • Posts: 3671
8 months 4 weeks ago #6 by crosire
A "Disable UI spacing" option sounds the most feasible.

Please Log in or Create an account to join the conversation.

  • Posts: 154
8 months 4 weeks ago #7 by seri14
In personal impression, the real reason is not to add space but to grouping clearify each other variables.
It can make done by use ui_category annotation, but I guess who felt it have some problems about the displaying.

Please Log in or Create an account to join the conversation.