Page MenuHome

Material viewport shading mode doesn't respect the "clip" image texture setting
Closed, ArchivedPublic

Description

System Information
OSX Sierra and Windows 10

Blender Version
2.79.1 2017-12-02 e1eb1fbfcac
2.79 2017-09-11 5bd8ac9

Exact steps for others to reproduce the error

  1. Switch to Cycles renderer
  2. Set up a simple material as shown in the attached sample: Plane with image texture, set extension mode to "clip", translate the U coordinate by 0.5.
  3. View the scene in the 3D viewport with Rendered mode and Material mode.

Expected: Texture should be clipped in the Material view, just like it is in the Rendered view
Actual: Texture isn't clipped, but extended. Setting the extension mode in the Image Texture node has no effect on the Material view.

I like using the Material view in the 3D viewport to work on my diffuse textures because it's very fast, so it's annoying that I can't use it to see what a clipped image texture will look like.

Event Timeline

Sergey Sharybin (sergey) changed the task status from Unknown Status to Unknown Status.Dec 5 2017, 10:12 AM
Sergey Sharybin (sergey) claimed this task.

Thanks for the report, but this is a known limitation since initial Clipping implementation in Cycles: for GLSL e really need to use OpenGL clipping, which is fast but which would requite some internal changes in how we work with OpenGL textures. Currently, we only use one OpenGL texture per image, which will cause unpredictable results if the same image is used with different clipping/extension methods.

Better to make sure it's osmething supported in new viewport of Blender 2.8 than try to fix it in current master.

So, adding it to the radars of @Dalai Felinto (dfelinto) and @Clément Foucault (fclem).

P.S. Was quite sure it's listed in our TODO list in Wiki, but couldn't find it. So added it there: https://wiki.blender.org/index.php/Dev:Source/Render/Cycles/ToDo#Smaller_Features

Yep that's something on my TODO list for sure.

I think using the texture unit clipping is too much problem as you mention. Using different texture view using ARB_texture_view could aleviate this issue but that needs gl 4.3 core.

For the small overhead it represent I think we can live with it being a GLSL hack.

Same thing would apply for the filter texture parameter.