Improve compatibility with GLES back-end

This commit is contained in:
Edwin Jakobs
2024-03-10 18:39:21 +01:00
parent b9b1b95ca0
commit e3f5e07b86
62 changed files with 182 additions and 195 deletions

View File

@@ -93,7 +93,7 @@ val shaderVSM = """
|// -- shaderVSM
|float linstep(float min, float max, float v)
|{
| return clamp((v - min) / (max - min), 0, 1);
| return clamp((v - min) / (max - min), 0.0, 1.0);
|}
|// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch08.html
|float chebyshevUpperBound(vec2 moments, float t, float minVariance) {
@@ -224,7 +224,7 @@ float ggx(vec3 N, vec3 V, vec3 L, float roughness, float F0)
D = alphaSqr/(pi * denom * denom);
// F
float dotLH5 = pow(1.0f-dotLH,5);
float dotLH5 = pow(1.0f-dotLH,5.0);
F = F0 + (1.0-F0)*(dotLH5);
// V