This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateFragmentShader( maxDirLights, maxPointLights ) { | |
var chunks = [ | |
"#ifdef GL_ES", | |
"precision highp float;", | |
"#endif", | |
maxDirLights ? "#define MAX_DIR_LIGHTS " + maxDirLights : "", | |
maxPointLights ? "#define MAX_POINT_LIGHTS " + maxPointLights : "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Approach 1 (links) | |
// Once the renderer finds a *MeshFaceMaterial*, it'll process the face material array | |
var head_material = [ new MeshBitmapUVMappingMaterial( head_bitmap ) ]; | |
var torso_material = [ new MeshBitmapUVMappingMaterial( torso_bitmap ) ] | |
mesh.material = [ new MeshFaceMaterial(), new MeshColorStrokeMaterial( 0xff0000 ) ]; | |
mesh.faces[ 0 ].material = head_material; | |
mesh.faces[ 1 ].material = head_material; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Approach 1 (links) | |
// Once the renderer finds a *MeshFaceMaterial*, it'll process the face material array | |
var common_material = [ new BitmapUVMaterial( bitmap ) ]; | |
mesh.material = [ new MeshFaceMaterial(), new MeshColorStrokeMaterial( 0xff0000 ) ]; | |
mesh.faces[ 0 ].material = common_material; | |
mesh.faces[ 1 ].material = common_material; | |
// Approach 2 (indices) |