Mesh performance issues?

I figured out what the problem here is. It’s the asset size itself, it’s actually like 3-6 times as large as the visible pixels. Creating huge amounts of overdraw that aren’t even seen and can’t be tracked by blendMode ADDITIVE because there’s no pixel value to add. I tested out again with a properly sized and cropped image and the results were way better, clean 120 fps with many meshes and while zooming too -

@skar - loaded your latest isometric demo and shader, both into Codea tabs.
Note the Shader code had huge gaps present between text sections. I could collapse many of them by deleting blanks from the bottom of the gaps which seemed to remove blank lines/hidden control codes. Occasionally I deleted the odd character but undo replaced it .

However it crashed Codea after a few deletion/edits. What editor have you used for the Shader?

copy to: @Simeon @John @dave1707 @jfperusse

Began sending a crash report but lost it when trying to get data from Codea. Will try to repeat and complete crash report.

Update: on reloading Codea and project the Shader code looked to have either retained my editing or just the edited section. First time load had over 4000 lines, second time over 1000 lines (that’s in line numbers used).

@Bri_G i used a combination of raw text in the editor the way the shader.lua file is written and also the built in shader lab in Codea, but the shader lab often crashes just when opening it, I typically would copy/paste my code directly into it just to see the rendered results

I’m not sure where the large gaps are coming from, i just downloaded the shader.zip here and extracted it and opened it in the app Kodex and it looks fine, around 1000 lines, no gaps and I can copy/paste it into Codea fine

@skar @Bri_G I extracted the Shader.zip in the Files app. When I looked at the extracted code, it looked OK, no gaps. I copied the file and pasted it into a Codea project. When I scrolled thru it, I found large gaps in the code. The odd thing was when I scrolled from the start to the end, the gaps were in different places than when it scrolled from the end to the start. So there must be something in the file that the Codea editor isn’t handling right.

@dave1707 - thanks for the confirmation. After reload there was around 1000 lines but the source code must contain formatting characters or unrecognized characters in the Codea editor.

Loading, saving and reloading may remove those characters.

@Bri_G Once I closed the project and reopened it, the gaps were gone. There were some errors in the code, but since I wasn’t going to do anything with the file, I didn’t care about them. Deleted the project.

@dave1707

I copied the file and pasted it into a Codea project.

How did you do that exactly?

@skar I downloaded your Shader.zip file from Codea to the Files app. I extracted the file there. I did a copy of the file from the Files app, loaded Codea and opened a new project. I then did the paste in the new project.

@skar - for your info, I downloaded both files and shared the zipped files with Codea. I didn’t find the shader file in the Codea program so I searched for the file in the Codea root. Both downloaded files were there. I then loaded the two text files into an editor, I’ll check later and post which one, then copied and pasted both from the editor into the Codea project as separate tabs.

Edit: the editor I used was Textastic, I selected all then copied the code and pasted straight into a new blank tab. I repeated this and the gaps are still there. Also, the gaps appear initially but are gone after re-opening the tab later.

@Bri_G can you try a different app like Kodex or Koder, both are free

@Skar - have Koder but not used it much. When it loads it’s locked into loading the open file which doesn’t exist anymore and Koder is locked in to tat screen. Do you know how to get round that?

Edit: re-installed Koder, solved that problem. Loaded up, copied and pasted code into Shadertab, same problem.