Can a HTML5 physics game run smoothly at 60fps on an external monitor?

You can find the default materials and programs in the builtins folder. If you are using sprites make a copy of the sprite material and fp/vp programs then set the copy of the material to be set to the new copies of the fragment program/vertex program and not old. Then in the vp you can set

attribute mediump vec4 position;

to

attribute highp vec4 position;

While you’re at it you can set a DIFFUSE_TEXTURE sampler to the material samplers and set it up how you want.

If you don’t modify the fp you don’t need a custom copy of it.

You might need highp set on other values too. Test and see.

4 Likes