diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-02 06:08:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-02 06:08:33 +0400 |
commit | 69bd72c3b6aa1fdaab0c1232a6ba1e3e4c9029fa (patch) | |
tree | bba65f8473ee4c3c2b6650f567964955b8611940 /source/blender/gpu/intern/gpu_material.c | |
parent | fb994b3c857bdf3a7313da046580c0fb76e8b620 (diff) |
quiet gcc float -> double promotion warnings.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 8e71f259557..4155b7a8ac0 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1060,7 +1060,7 @@ static void do_material_tex(GPUShadeInput *shi) else newnor = tnor; - norfac = MIN2(fabsf(mtex->norfac), 1.0); + norfac = MIN2(fabsf(mtex->norfac), 1.0f); if(norfac == 1.0f && !GPU_link_changed(stencil)) { shi->vn = newnor; @@ -1308,7 +1308,7 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr) /* exposure correction */ if(world->exp!=0.0f || world->range!=1.0f) { linfac= 1.0 + pow((2.0*world->exp + 0.5), -10); - logfac= log((linfac-1.0)/linfac)/world->range; + logfac= log((linfac-1.0f)/linfac)/world->range; GPU_link(mat, "set_value", GPU_uniform(&linfac), &ulinfac); GPU_link(mat, "set_value", GPU_uniform(&logfac), &ulogfac); @@ -1481,10 +1481,10 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l lamp->spotsi= la->spotsize; if(lamp->mode & LA_HALO) - if(lamp->spotsi > 170.0) - lamp->spotsi = 170.0; + if(lamp->spotsi > 170.0f) + lamp->spotsi = 170.0f; lamp->spotsi= cos(M_PI*lamp->spotsi/360.0); - lamp->spotbl= (1.0 - lamp->spotsi)*la->spotblend; + lamp->spotbl= (1.0f - lamp->spotsi)*la->spotblend; lamp->k= la->k; lamp->dist= la->dist; |