Update the projective texture shader to solve the texture interpolation artifact.

This commit is contained in:
YunfeiBai
2018-04-09 17:15:42 -07:00
parent 6b97e1e604
commit b032a1fd60
5 changed files with 9 additions and 18 deletions

View File

@@ -80,7 +80,5 @@ static const char* projectiveTextureInstancingVertexShader= \
" vec4 vertexLoc = MVP* vec4((instance_position+localcoord).xyz,1);\n"
" gl_Position = vertexLoc;\n"
" fragment.color = instance_color;\n"
" vec4 projcoords = TextureMVP * vec4((instance_position+localcoord).xyz,1);\n"
" vert.texcoord = projcoords.xy/projcoords.z;\n"
"}\n"
;