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

Improve initialization speed. #64

Open
mtwoodard opened this issue Jan 11, 2019 · 2 comments
Open

Improve initialization speed. #64

mtwoodard opened this issue Jan 11, 2019 · 2 comments

Comments

@mtwoodard
Copy link
Owner

I've been trying to figure out what has been causing the initialization of the program to slow down so much. Once loaded the program runs smoothly so I figure it must be something to do with the loading of the shader files. I did find this response to someones question regarding loading a large file on stack overflow A commenter mentions that the way three loads files uses excessive memory. I think this is likely our issue.

A possible solution would be to break up the shader file into more digestible parts. I went ahead and tried this method for the time being since it's relatively simple.

Another option would be to either find some other loading library for loading large files to strings or to write our own. Both of these options would likely be the best solutions however would take a little while to implement.

@mtwoodard
Copy link
Owner Author

So I've asked around on a few different forums and apparently this slow down could be due to shader compiling to directx hlsl code on Windows devices. Windows can use native opengl or a intermediary called angle that may be able to help us Mr Doob has written about it here.

@mtwoodard
Copy link
Owner Author

We can also run the program on Mac or Linux. As there is no DirectX to compile to it will just compile normally to OpenGL instead. You can read about this further on this post or this post.

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

1 participant