Add example for projective texture.

This commit is contained in:
yunfeibai
2018-02-11 13:50:45 -08:00
parent 0bebf86b50
commit 08548e1ef0
8 changed files with 163 additions and 20 deletions

View File

@@ -79,8 +79,8 @@ static const char* useShadowMapInstancingVertexShader= \
" \n"
" vec4 vertexLoc = MVP* vec4((instance_position+localcoord).xyz,1);\n"
" gl_Position = vertexLoc;\n"
" ShadowCoord = DepthBiasModelViewProjectionMatrix * vec4((instance_position+localcoord).xyz,1);\n"
" fragment.color = instance_color;\n"
" vert.texcoord = uvcoords;\n"
" vec4 projcoords = DepthBiasModelViewProjectionMatrix * vec4((instance_position+localcoord).xyz,1);\n"
" vert.texcoord = projcoords.xy;\n"
"}\n"
;