Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 3a4aa75aa01..cdb3f57ca20 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -6,6 +6,9 @@ float exp_blender(float f)
float compatible_pow(float x, float y)
{
+ if(y == 0.0) /* x^0 -> 1, including 0^0 */
+ return 1.0;
+
/* glsl pow doesn't accept negative x */
if(x < 0.0) {
if(mod(-y, 2.0) == 0.0)