mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-13 16:44:50 +02:00
#15 WebGL NVIDIA workaround
This commit is contained in:
@@ -165,7 +165,7 @@ uniform sampler2D sNormal;
|
||||
vec4 caustics() {
|
||||
float rOldArea = length(dFdx(vOldPos.xyz)) * length(dFdy(vOldPos.xyz));
|
||||
float rNewArea = length(dFdx(vNewPos.xyz)) * length(dFdy(vNewPos.xyz));
|
||||
rNewArea = max(rNewArea, 0.00002);
|
||||
rNewArea = max(rNewArea, 0.00002); // WebGL NVIDIA workaround >_<
|
||||
float value = clamp(rOldArea / rNewArea * 0.2, 0.0, 1.0) * vOldPos.w;
|
||||
return vec4(value, 0.0, 0.0, 0.0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user