fix transparency & add glass

This commit is contained in:
2022-02-25 17:58:42 +08:00
parent 32b06810e2
commit 501037d84d
5 changed files with 11 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ const (
PlayerPlaceCooldown = 200 * time.Millisecond
)
var placeId = [10]int{blocks.Stone, blocks.Dirt, blocks.Grass, blocks.LogOak, blocks.PlanksOak, blocks.LeavesOak, blocks.Debug, blocks.DebugDir, blocks.Bedrock, blocks.Water}
var placeId = [10]int{blocks.Stone, blocks.Dirt, blocks.Grass, blocks.LogOak, blocks.PlanksOak, blocks.LeavesOak, blocks.Glass, blocks.DebugDir, blocks.Bedrock, blocks.Water}
var placei = 0
var logs string

View File

@@ -129,6 +129,7 @@ func (g *Game) initRender() (err error) {
r.texture.GenerateMipMap()
gl.BindTexture(gl.TEXTURE_2D, r.texture.Handle())
gl.TexParameterf(gl.TEXTURE_2D, gl.TEXTURE_MAX_ANISOTROPY, maxaf)
r.depthmap.shader.SetUniformTexture("tex", r.texture)
r.gbuffer.shader.SetUniformTexture("tex", r.texture)
r.water.shader.SetUniformTexture("tex", r.texture)
igwrap.SetTextureFlag(r.texture.Handle(), igwrap.TextureFlag_Linear, igwrap.TextureFlag_FlipY)