diff options
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 3aa8f84c3de..6e475ace09d 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1442,7 +1442,7 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers, MVert *mvert, fmask = (vmask[fv[0]] + vmask[fv[1]] + vmask[fv[2]] + - vmask[fv[3]]) * 0.25; + vmask[fv[3]]) * 0.25f; } } else { @@ -1915,7 +1915,7 @@ static void gpu_draw_buffers_legacy_mesh(GPU_Buffers *buffers) buffers->vmask[fv[1]] + buffers->vmask[fv[2]]); if (f->v4) - fmask = (fmask + buffers->vmask[fv[3]]) * 0.25; + fmask = (fmask + buffers->vmask[fv[3]]) * 0.25f; else fmask /= 3.0f; gpu_color_from_mask_set(fmask, diffuse_color); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 1fd215b1ec2..ef73764753c 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1589,8 +1589,8 @@ void GPU_lamp_update_distance(GPULamp *lamp, float distance, float att1, float a void GPU_lamp_update_spot(GPULamp *lamp, float spotsize, float spotblend) { - lamp->spotsi= cos(M_PI*spotsize/360.0); - lamp->spotbl= (1.0f - lamp->spotsi)*spotblend; + lamp->spotsi= cosf((float)M_PI * spotsize / 360.0f); + lamp->spotbl= (1.0f - lamp->spotsi) * spotblend; } static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *la, GPULamp *lamp) |