Skip to content

Commit

Permalink
UPBGE: Fix mipmapping on cube maps.
Browse files Browse the repository at this point in the history
As the world  background cube map was not using mipmapping then the image used
don't generated mipmap levels. This is not a problem if this same texture is not
reused, but the user will certainly reuse this same texture and in this case
mipmapping will not working in regular materials.

To fix this issue we use mipmaps for background, this has not effect on render.
  • Loading branch information
panzergame committed Jul 19, 2016
1 parent 399ffc4 commit b51d7c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/blender/editors/space_view3d/view3d_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,7 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
GPUMaterial *gpumat = GPU_material_world(scene, scene->world);

/* calculate full shader for background */
GPU_material_bind(gpumat, 1, 1, 1.0, false, rv3d->viewmat, rv3d->viewinv, rv3d->viewcamtexcofac, (v3d->scenelock != 0));
GPU_material_bind(gpumat, 1, 1, 1.0, true, rv3d->viewmat, rv3d->viewinv, rv3d->viewcamtexcofac, (v3d->scenelock != 0));

bool material_not_bound = !GPU_material_bound(gpumat);

Expand Down

0 comments on commit b51d7c6

Please sign in to comment.