forked from bartvdbraak/blender
Fix T45789: Materials with transparency not properly rendered in viewport in Material Render mode
This is a bit tricky one -- ideally viewport should detect whether alpha is used in the shader tree and if so do separate viewport pass for that objects. But in practice it's really tricky to detect whether alpha is affected by shader or not without evaluating the tree for all possible input values. We also can't assume that alpha might always be affected because it'll slow viewport drawing down. For until some smart solution is found simply expose alpha blending mode used by the viewport. It could be found below the Viewport Color settings.
This commit is contained in:
parent
79af9b1260
commit
ad0c2d6cbb
@ -1164,13 +1164,17 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
|
||||
col.prop(mat, "alpha")
|
||||
|
||||
col.separator()
|
||||
col.prop(mat, "pass_index")
|
||||
col.label("Viewport Alpha:")
|
||||
col.prop(mat.game_settings, "alpha_blend", text="")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.label("Viewport Specular:")
|
||||
col.prop(mat, "specular_color", text="")
|
||||
col.prop(mat, "specular_hardness", text="Hardness")
|
||||
|
||||
col.separator()
|
||||
col.prop(mat, "pass_index")
|
||||
|
||||
|
||||
class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
|
||||
bl_label = ""
|
||||
|
Loading…
Reference in New Issue
Block a user