more descriptive name for the blend-normal function because why there are two fucking standards for an alpha channel

This commit is contained in:
minjaesong
2022-10-31 01:52:40 +09:00
parent ccef7c32a0
commit 474279aefe
42 changed files with 122 additions and 108 deletions

View File

@@ -207,15 +207,15 @@ internal object BlocksDrawer {
}
internal fun drawWall(projectionMatrix: Matrix4, drawGlow: Boolean) {
gdxSetBlendNormal()
gdxBlendNormalStraightAlpha()
renderUsingBuffer(WALL, projectionMatrix, drawGlow)
gdxSetBlendMul()
gdxBlendMul()
renderUsingBuffer(OCCLUSION, projectionMatrix, false)
}
internal fun drawTerrain(projectionMatrix: Matrix4, drawGlow: Boolean) {
gdxSetBlendNormal()
gdxBlendNormalStraightAlpha()
renderUsingBuffer(TERRAIN, projectionMatrix, drawGlow)
renderUsingBuffer(FLUID, projectionMatrix, drawGlow)
@@ -223,14 +223,14 @@ internal object BlocksDrawer {
internal fun drawFront(projectionMatrix: Matrix4) {
gdxSetBlendMul()
gdxBlendMul()
// let's just not MUL on terrain, make it FLUID only...
renderUsingBuffer(FLUID, projectionMatrix, false)
gdxSetBlendNormal()
gdxBlendNormalStraightAlpha()
/*if (selectedWireRenderClass.isNotBlank()) {
//println("Wires! draw: $drawWires") // use F10 instead

View File

@@ -7,7 +7,7 @@ import net.torvald.terrarum.App
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.TerrarumAppConfiguration.TILE_SIZEF
import net.torvald.terrarum.blendMul
import net.torvald.terrarum.blendNormal
import net.torvald.terrarum.blendNormalStraightAlpha
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.blockstats.BlockStats
import net.torvald.terrarum.gameworld.GameWorld
@@ -68,7 +68,7 @@ object FeaturesDrawer {
(App.scr.height * if (zoom < 1) 1f / zoom else zoom).roundToInt()
)
blendNormal(batch)
blendNormalStraightAlpha(batch)
}
/**