Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity 2018.3.6f1] Unity freezes when adjusting Fractal Power value in Mandelbulb scene #1

Closed
RyanDunagan7899 opened this issue Apr 4, 2019 · 5 comments

Comments

@RyanDunagan7899
Copy link

This is a wonderful demonstration of what Unity is capable of. Thank you for sharing it.

When adjusting the Fractal Power value in the Mandelbulb scene, Unity will freeze. If adjusted in the editor out of play mode, in the editor in play mode, or in a build of the scene, the editor/build will freeze.

I tried only incrementing the Fractal Power on a button hold, and it would run fine until I pressed the button. The value would increment slightly, and the bulb would visually adjust, then the editor/build would freeze.

Also, the script associations in the scene (1 on Main Camera, and 2 on its child object Camera) were broken.

@RyanDunagan7899
Copy link
Author

I've just discovered that rotating the main camera in the Mendelbulb scene will cause a similar freeze of the editor.

@sliterok
Copy link

sliterok commented Apr 5, 2019

I guess that's something to do with the amount of computation required to render such scene. I was monitoring my gpu usage while moving camera in the Mendelbulb scene and at the moment of freeze gpu usage rocketed to 100%

@RyanDunagan7899
Copy link
Author

@sliterok The same GPU usage spike occurs on my 1080Ti, however I did some further testing and found out that if I disable the FractalMaster script on the camera, move the camera coordinates away from where it is located in the scene and re-enable it, the crash in editor also occurs.

GPU Spike

Oddly enough, Unity will still exit just fine using the X in the top left to close the application without need for a force close via task manager.

I've been looking at the Fractal Compute Shader code to see if there was anything that stood out as something that could be cleaned up, but I've only just begun learning shader programming, so I don't think I'm the man for the job.

@SebLague
Copy link
Owner

SebLague commented Apr 5, 2019

I've added a max march step count to the mandelbulb shader, which will hopefully resolve this. Please let me know if it's still crashing and I'll reopen the issue.

@SebLague SebLague closed this as completed Apr 5, 2019
@nachoskywalker
Copy link

Hello Seb and others. I am having a similar problem. I have a compute shader under unity which is helping me to calculate some data to acelerate marching shadows. In the moment I increase the internal loops a little bit the compute is not slower. It just gets frozen. Do you know if there is a limit in the internal loops in a shader or maybe a limit in time or something. Its really hard to debug the problem. Thanks a lot!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants