Skip to content

Commit 104de39

Browse files
author
samuncle
committed
Disable completly space screen reflexion for opengl-es (probably too slow for android
1 parent 3291e23 commit 104de39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

data/shaders/IBL.frag

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ vec3 RayCast(vec3 dir, inout vec3 hitCoord, out float dDepth, in sampler2D Depth
8888
{
8989
// Mix with fallback (black area should be dark anyway)
9090
vec3 finalColor = textureLod(albedo, projectedCoord.xy, 1.0).rgb;
91+
// FIXME, this is heavy, needs to be an option in the settings
9192
//vec3 finalColor = fastBlur(projectedCoord.xy, spread);
9293
if ((finalColor.r + finalColor.g + finalColor.b) > 0.)
9394
{
@@ -132,8 +133,9 @@ void main(void)
132133
// Extract roughness
133134
float specval = texture(ntex, uv).z;
134135

136+
#ifdef GL_ES
135137
Spec = vec4(.25 * SpecularIBL(normal, eyedir, specval), 1.);
136-
138+
#else
137139
// Compute Space Screen Reflection =========================================================
138140

139141
float lineardepth = textureLod(dtex, uv, 0.).x;
@@ -167,5 +169,6 @@ void main(void)
167169
hitPos, dDepth, dtex, fallback, mix(0.001, 0.01, 1.0 - specval));
168170

169171
Spec = vec4(outColor.rgb, 1.0);
172+
#endif
170173

171174
}

0 commit comments

Comments
 (0)