Cleanup: Make format

This commit is contained in:
Jeroen Bakker 2023-11-24 07:20:52 +01:00
parent 23430f4db8
commit 9aac9254cc
1 changed files with 14 additions and 11 deletions

View File

@ -73,6 +73,7 @@ batch = batch_for_shader(
},
)
def draw():
shader.uniform_float("modelMatrix", Matrix.Translation((0, 0, 0)) @ Matrix.Scale(1, 4))
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
@ -82,11 +83,13 @@ def draw():
compute_shader.uniform_float("time", time.time() - start_time)
gpu.compute.dispatch(compute_shader, 128, 128, 1)
def drawTimer():
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.tag_redraw()
return 1.0 / 60.0
bpy.app.timers.register(drawTimer)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')