| 118 | } |
| 119 | |
| 120 | vec4 sampleTexture(int id, vec2 uv) |
| 121 | { |
| 122 | ivec4 sampleData = texelFetch(TextureTable, id); |
| 123 | sampleData.zw &= ivec2(32767); |
| 124 | |
| 125 | uv = scaleUv(uv, sampleData.y); |
| 126 | |
| 127 | vec2 baseUv = uv; |
| 128 | uv = bilinearSharpness(uv, TexSamplingParam.x); |
| 129 | |
| 130 | vec3 uv3; |
| 131 | uv3.xy = wrapCoordF(uv.xy, vec2(sampleData.zw)); |
| 132 | uv3.xy += vec2(sampleData.xy & ivec2(4095)); |
| 133 | uv3.z = float(sampleData.x >> 12); |
| 134 | |
| 135 | #ifdef OPT_MIPMAPPING |
| 136 | baseUv /= vec2(4096.0, 4096.0); |
| 137 | return textureGrad(Textures, uv3 / vec3(4096.0, 4096.0, 1.0), dFdx(baseUv), dFdy(baseUv)); |
| 138 | #else |
| 139 | return textureLod(Textures, uv3 / vec3(4096.0, 4096.0, 1.0), 0.0); |
| 140 | #endif |
| 141 | } |
| 142 | |
| 143 | vec4 sampleTexture(int id, vec2 uv, bool sky, bool flip, bool applyFlatWarp, out vec3 tint) |
| 144 | { |
nothing calls this directly
no test coverage detected