PyAPI: remove deprecated 2D_/3D_ prefix for built-in shader names
Names passed to gpu.shader.from_builtin() no longer skip the 2D_/3D_ prefix.
This commit is contained in:
@@ -21,7 +21,7 @@ mesh.loop_triangles.foreach_get(
|
||||
|
||||
vertex_colors = [(random(), random(), random(), 1) for _ in range(len(mesh.vertices))]
|
||||
|
||||
shader = gpu.shader.from_builtin('3D_SMOOTH_COLOR')
|
||||
shader = gpu.shader.from_builtin('SMOOTH_COLOR')
|
||||
batch = batch_for_shader(
|
||||
shader, 'TRIS',
|
||||
{"pos": vertices, "color": vertex_colors},
|
||||
|
||||
Reference in New Issue
Block a user