Difficulty with getting compute shader code in docs to work

You need to extract the data. Add:
base.graphicsEngine.extractTextureData(myTex2,base.win.get_gsg())

base.graphicsEngine.dispatchCompute((32, 32, 1), sattr, base.win.get_gsg())
base.graphicsEngine.extractTextureData(myTex2,base.win.get_gsg())

# Store the output
frame = PNMImage()
print("Tex Store:",myTex2.store(frame))
frame.write("test.png")
1 Like