[Bf-blender-cvs] [c4b6d60] viewport_experiments: Attempt to fix shader compilation in OSX. strict compilation does not allow dividing float by integer.
Antony Riakiotakis
noreply at git.blender.org
Mon Sep 22 14:20:41 CEST 2014
Commit: c4b6d60af32aa0413fe4efa1d1e771f71ee7b160
Author: Antony Riakiotakis
Date: Mon Sep 22 14:20:30 2014 +0200
Branches: viewport_experiments
https://developer.blender.org/rBc4b6d60af32aa0413fe4efa1d1e771f71ee7b160
Attempt to fix shader compilation in OSX. strict compilation does not
allow dividing float by integer.
===================================================================
M source/blender/gpu/shaders/gpu_shader_fx_frag.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fx_frag.glsl
index 590ec57..ce1909e 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_frag.glsl
@@ -81,7 +81,7 @@ float calculate_ssao_factor(float depth)
}
}
- factor /= NUM_SAMPLES * NUM_SAMPLES;
+ factor /= float(NUM_SAMPLES * NUM_SAMPLES);
return max(0.0, factor * ssao_params.y);
}
More information about the Bf-blender-cvs
mailing list