-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathuniforms.glsl
More file actions
219 lines (185 loc) · 7.11 KB
/
Copy pathuniforms.glsl
File metadata and controls
219 lines (185 loc) · 7.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/*----------------------------------------------------------------------------------------------
_____ _____
( ___ ) ( ___ )
| |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
| | ██╗ ██╗███╗ ██╗██╗███████╗ ██████╗ ██████╗ ███╗ ███╗███████╗ | |
| | ██║ ██║████╗ ██║██║██╔════╝██╔═══██╗██╔══██╗████╗ ████║██╔════╝ | |
| | ██║ ██║██╔██╗ ██║██║█████╗ ██║ ██║██████╔╝██╔████╔██║███████╗ | |
| | ██║ ██║██║╚██╗██║██║██╔══╝ ██║ ██║██╔══██╗██║╚██╔╝██║╚════██║ | |
| | ╚██████╔╝██║ ╚████║██║██║ ╚██████╔╝██║ ██║██║ ╚═╝ ██║███████║ | |
| | ╚═════╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | |
|___|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|___|
(_____) (thanks to isuewo and SpacEagle17) (_____)
---------------------------------------------------------------------------------------------*/
uniform bool heavyFog = false;
uniform bool isElytraFlying = false;
uniform int blockEntityId;
uniform int currentRenderedItemId;
uniform int entityId;
uniform int frameCounter;
uniform int heldBlockLightValue;
uniform int heldBlockLightValue2;
uniform int heldItemId;
uniform int heldItemId2;
uniform int isEyeInWater;
uniform int moonPhase;
uniform int worldTime;
uniform int worldDay;
uniform float aspectRatio;
uniform float blindness;
uniform float darknessFactor;
uniform float darknessLightFactor;
uniform float maxBlindnessDarkness;
uniform float eyeAltitude;
uniform float frameTime;
uniform float frameTimeCounter;
uniform float far;
uniform float near;
uniform float nightVision;
uniform float rainStrength;
uniform float screenBrightness;
uniform float viewHeight;
uniform float viewWidth;
uniform float wetness;
uniform float sunAngle;
uniform float playerMood;
uniform float cloudHeight = 192.0;
uniform ivec2 atlasSize;
uniform ivec2 eyeBrightness;
uniform vec3 cameraPosition;
uniform vec3 fogColor;
uniform vec3 previousCameraPosition;
uniform vec3 skyColor;
uniform vec3 eyePosition;
uniform vec3 relativeEyePosition;
uniform vec3 playerLookVector;
uniform vec4 entityColor;
uniform vec4 lightningBoltPosition;
uniform mat4 gbufferModelView;
uniform mat4 gbufferModelViewInverse;
uniform mat4 gbufferPreviousModelView;
uniform mat4 gbufferPreviousProjection;
uniform mat4 shadowModelView;
uniform mat4 shadowModelViewInverse;
uniform mat4 shadowProjection;
uniform mat4 shadowProjectionInverse;
uniform sampler2D colortex0;
uniform sampler2D colortex1;
uniform sampler2D colortex2;
uniform sampler2D colortex3;
uniform sampler2D colortex4;
uniform sampler2D colortex5;
uniform sampler2D colortex6;
uniform sampler2D colortex7;
uniform sampler2D colortex8;
uniform sampler2D colortex12;
uniform sampler2D depthtex0;
uniform sampler2D depthtex1;
uniform sampler2D gaux2;
uniform sampler2D gaux4;
uniform sampler2D normals;
uniform sampler2D noisetex;
uniform sampler2D specular;
uniform sampler2D tex;
uniform ivec3 cameraPositionInt;
uniform ivec3 previousCameraPositionInt;
uniform vec3 cameraPositionFract;
uniform vec3 previousCameraPositionFract;
#ifdef IS_IRIS
uniform bool is_invisible;
uniform int renderStage;
#if MC_VERSION >= 12109
uniform float endFlashIntensityM;
uniform vec3 endFlashPosition;
// vec3 endFlashPosition = vec3(0.0, 0.0, -100.0);
#endif
#endif
#if SHADOW_QUALITY > -1 || defined LIGHTSHAFTS_ACTIVE || defined FF_BLOCKLIGHT
uniform sampler2D shadowcolor0;
uniform sampler2D shadowcolor1;
uniform sampler2DShadow shadowtex1;
#ifdef COMPOSITE1
uniform sampler2D shadowtex0;
#else
uniform sampler2DShadow shadowtex0;
#endif
#endif
#if !defined DH_TERRAIN && !defined DH_WATER
uniform mat4 gbufferProjection;
uniform mat4 gbufferProjectionInverse;
#endif
#ifdef DISTANT_HORIZONS
uniform int dhRenderDistance;
uniform mat4 dhProjection;
uniform mat4 dhProjectionInverse;
uniform mat4 dhPreviousProjection;
uniform sampler2D dhDepthTex;
uniform sampler2D dhDepthTex1;
#endif
#ifdef VOXY
uniform int vxRenderDistance;
uniform mat4 vxProj;
uniform mat4 vxProjInv;
uniform mat4 vxProjPrev;
uniform mat4 vxModelView;
uniform mat4 vxModelViewInv;
uniform mat4 vxModelViewPrev;
uniform sampler2D vxDepthTexTrans;
uniform sampler2D vxDepthTexOpaque;
#endif
#if defined HDR_ENABLED
// #undef HDR_ENABLED
uniform float HdrGamePeakBrightness;
uniform float HdrGamePaperWhiteBrightness;
uniform float HdrGameMinimumBrightness;
uniform float HdrUIBrightness;
#endif
// #define HDR_ENABLED // HDRMod forced enable for testing
// const float HdrGamePeakBrightness = 1000.f;
// const float HdrGamePaperWhiteBrightness = 203.f;
// const float HdrUIBrightness = 203.f;
#if COLORED_LIGHTING_INTERNAL > 0
uniform usampler3D voxel_sampler;
uniform sampler3D floodfill_sampler;
uniform sampler3D floodfill_sampler_copy;
#endif
#ifdef PUDDLE_VOXELIZATION
uniform usampler2D puddle_sampler;
#endif
#if WORLD_SPACE_REFLECTIONS_INTERNAL > 0
uniform sampler2D textureAtlas;
uniform usampler3D wsr_sampler;
uniform usampler3D wsr_lod_sampler;
#if WORLD_SPACE_PLAYER_REF == 1
uniform sampler2D playerAtlas_sampler;
#endif
#ifdef CLOUD_SHADOWS
uniform sampler2D cloudWaterTex;
#endif
#endif
/*-----------------------------------------------------------------------------
___ _ _ ___ _____ ___ __ __ _ _ _ _ ___ ___ ___ ___ __ __ ___
/ __| | | / __|_ _/ _ \| \/ | | | | | \| |_ _| __/ _ \| _ \ \/ / __|
| (__| |_| \__ \ | || (_) | |\/| | | |_| | .` || || _| (_) | / |\/| \__ \
\___|\___/|___/ |_| \___/|_| |_| \___/|_|\_|___|_| \___/|_|_\_| |_|___/
-----------------------------------------------------------------------------*/
uniform float framemod2;
uniform float framemod4;
uniform float framemod8;
uniform float framemod600;
uniform float isEyeInCave;
uniform float inDry;
uniform float inRainy;
uniform float inSnowy;
uniform float velocity;
uniform float starter;
uniform float frameTimeSmooth;
uniform float eyeBrightnessM;
uniform float eyeBrightnessM2;
uniform float rainFactor;
uniform float inBasaltDeltas;
uniform float inCrimsonForest;
uniform float inNetherWastes;
uniform float inSoulValley;
uniform float inWarpedForest;
uniform float inPaleGarden;