It seems like you have opened this file by double-clicking on it. In order to test your build in a browser you need to load this file from a web server. You can either upload this file and the rest of the files from a Defold HTML5 bundle to a web hosting service OR host them using a local web server on your home network.
In industry-established terms, a material that is not affected by lighting is called “unlit” or “non-lit”. It is used to create retro-style graphics or for effects that should not depend on lighting (headlights, lamps).
This example contains a game object with a model that has an unlit material applied to it. The material is assigned custom vertex and fragment shaders. The shader is very simple and just transfers the texture color to the model. This is an excellent starting point for creating new materials and for creating effects that do not depend on lighting. The shaders are written in GLSL 1.40, which is available from Defold 1.9.2.
To activate a perspective camera and to have camera controls, we added the orbit_camera.script script from the Orbit Camera (3D) example.
The model used in this example is from Kenney’s Train Pack, licensed under CC0.
Scripts
unlit.vp
unlit.fp
If you want to play with these examples, you can get the project on Github.
Do you want to see more examples? Why not write a few yourself and submit a pull request? We love contributions.