Screen and System Uniforms
These uniforms store information about the system running the shader, as well as screen related parameters and users options.
viewHeight
uniform float viewHeight;
This uniform saves the height of the screen in pixels/fragments.
viewWidth
uniform float viewWidth;
This uniform saves the width of the screen in pixels/fragments.
aspectRatio
uniform float aspectRatio;
This value stores the aspect ratio of the game window in a format of viewWidth
/
viewHeight
. More information about aspect ratios and there uses can be found on wikipedia.
screenBrightness
uniform float screenBrightness;
This uniform stores the screen brightness as set by the user in the video settings. The value ranges from 0
(lowest brightness) to 1
(highest brightness).
frameCounter
uniform int frameCounter;
This value stores the number of frames since the beginning of the program. The value resets to 0
the frame after reaching 720719
.
frameTime
uniform float frameTime;
This value stores the frame time of the previous frame in seconds. The frame time is the amount of time between the end of the previous frame and the end of the frame before that.
frameTimeCounter
uniform float frameTimeCounter;
This value stores the running time of the game in seconds. This value resets after 3600s and does not pause during the pause screen.
Iris Exclusive
currentColorSpaceuniform int currentColorSpace;
This value reads the color space used when displaying to the screen, as controlled through the video settings. 0
is sRGB, 1
is DCI_P3, 2
is Display P3, 3
is REC2020, 4
is Adobe RGB.
Iris Exclusive
currentDateuniform ivec3 currentDate;
This value stores the system date reported by the OS in the following format: ivec3(year, month, day)
.
Iris Exclusive
currentTimeuniform ivec3 currentTime;
This value stores the system time reported by the OS in the following format: ivec3(hour, minute, second)
. The hour value is in 24 hour format, for example 3pm would be stored as 15
.
Iris Exclusive
currentYearTimeuniform ivec2 currentYearTime;
This value stores the time since the beginning of the year and until the end of the year as reported by the OS in the following format: ivec2(seconds_ellapsed_in_year, seconds_remaining_in_year)
.