add a textured sphere8.obj test with obj loader

fix shaders, so that shadowed and non-shadowed are matching
fix registerGraphicsUnitSphereShape API (level of detail), support textured sphere too
add support for textured cube
add start for a Tutorial.cpp
This commit is contained in:
erwin coumans
2015-08-05 19:03:27 -07:00
parent 250068d5eb
commit a5669d2ffd
29 changed files with 2138 additions and 105 deletions

View File

@@ -55,14 +55,14 @@ static const char* useShadowMapInstancingVertexShader= \
"void main(void)\n"
"{\n"
" vec4 q = instance_quaternion;\n"
" ambient = vec3(0.3,.3,0.3);\n"
" ambient = vec3(0.6,.6,0.6);\n"
" \n"
" vec4 worldNormal = (quatRotate3( vertexnormal,q));\n"
" \n"
" normal = normalize(worldNormal).xyz;\n"
" lightDir = lightDirIn;\n"
" \n"
" vec4 axis = vec4(1,1,1,0);\n"
" \n"
" vec4 localcoord = quatRotate3( position.xyz*instance_scale,q);\n"
" vec4 vertexPos = MVP* vec4((instance_position+localcoord).xyz,1);\n"
" gl_Position = vertexPos;\n"