I draw a plane with a texture in libgdx, and it disappears when you look at it from the other side. Is there any way to make double-sided shader?
private Model createPlaneModel(final float width, final float height, final Material material,
final float u1, final float v1, final float u2, final float v2) {
modelBuilder.begin();
MeshPartBuilder bPartBuilder = modelBuilder.part("rect",
GL20.GL_TRIANGLES, VertexAttributes.Usage.Position |
VertexAttributes.Usage.Normal |
VertexAttributes.Usage.TextureCoordinates,
material);
//NOTE ON TEXTURE REGION, MAY FILL OTHER REGIONS, USE GET region.getU() and so on
//bPartBuilder.setUVRange(u1, v1, u2, v2);
bPartBuilder.rect(
-(width*0.5f), -(height*0.5f), 0,
(width*0.5f), -(height*0.5f), 0,
(width*0.5f), (height*0.5f), 0,
-(width*0.5f), (height*0.5f), 0,
1, 1, 1);
return (modelBuilder.end());
}