| 211 | } |
| 212 | |
| 213 | bool FShader::Load(const char * name, const char * vert_prog_lump, const char * frag_prog_lump, const char * proc_prog_lump, const char * light_fragprog, const char * defines) |
| 214 | { |
| 215 | static char buffer[10000]; |
| 216 | FString error; |
| 217 | |
| 218 | FString i_data = R"( |
| 219 | // these settings are actually pointless but there seem to be some old ATI drivers that fail to compile the shader without setting the precision here. |
| 220 | precision highp int; |
| 221 | precision highp float; |
| 222 | |
| 223 | // This must match the HWViewpointUniforms struct |
| 224 | layout(std140) uniform ViewpointUBO { |
| 225 | mat4 ProjectionMatrix; |
| 226 | mat4 ViewMatrix; |
| 227 | mat4 NormalViewMatrix; |
| 228 | |
| 229 | vec4 uCameraPos; |
| 230 | vec4 uClipLine; |
| 231 | |
| 232 | float uGlobVis; // uGlobVis = R_GetGlobVis(r_visibility) / 32.0 |
| 233 | int uPalLightLevels; |
| 234 | int uViewHeight; // Software fuzz scaling |
| 235 | float uClipHeight; |
| 236 | float uClipHeightDirection; |
| 237 | int uShadowmapFilter; |
| 238 | |
| 239 | int uLightBlendMode; |
| 240 | }; |
| 241 | |
| 242 | uniform int uTextureMode; |
| 243 | uniform vec2 uClipSplit; |
| 244 | uniform float uAlphaThreshold; |
| 245 | |
| 246 | // colors |
| 247 | uniform vec4 uObjectColor; |
| 248 | uniform vec4 uObjectColor2; |
| 249 | uniform vec4 uDynLightColor; |
| 250 | uniform vec4 uAddColor; |
| 251 | uniform vec4 uTextureBlendColor; |
| 252 | uniform vec4 uTextureModulateColor; |
| 253 | uniform vec4 uTextureAddColor; |
| 254 | uniform vec4 uFogColor; |
| 255 | uniform float uDesaturationFactor; |
| 256 | uniform float uInterpolationFactor; |
| 257 | |
| 258 | // Glowing walls stuff |
| 259 | uniform vec4 uGlowTopPlane; |
| 260 | uniform vec4 uGlowTopColor; |
| 261 | uniform vec4 uGlowBottomPlane; |
| 262 | uniform vec4 uGlowBottomColor; |
| 263 | |
| 264 | uniform vec4 uGradientTopPlane; |
| 265 | uniform vec4 uGradientBottomPlane; |
| 266 | |
| 267 | uniform vec4 uSplitTopPlane; |
| 268 | uniform vec4 uSplitBottomPlane; |
| 269 | |
| 270 | uniform vec4 uDetailParms; |
no test coverage detected