mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
lightmap downsample works, sampling bug fixed with Filter.NEAREST, now having shrinkage issue
This commit is contained in:
@@ -247,6 +247,9 @@ object Terrarum : ApplicationAdapter() {
|
||||
lateinit var shaderBlendGlow: ShaderProgram
|
||||
|
||||
|
||||
lateinit var textureWhiteSquare: Texture
|
||||
|
||||
|
||||
init {
|
||||
println("[Terrarum] os.arch = $systemArch") // debug info
|
||||
|
||||
@@ -299,6 +302,10 @@ object Terrarum : ApplicationAdapter() {
|
||||
fontSmallNumbers = TinyAlphNum
|
||||
|
||||
|
||||
textureWhiteSquare = Texture(Gdx.files.internal("assets/graphics/ortho_line_tex_2px.tga"))
|
||||
textureWhiteSquare.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest)
|
||||
|
||||
|
||||
ShaderProgram.pedantic = false
|
||||
shaderBlur = ShaderProgram(Gdx.files.internal("assets/blur.vert"), Gdx.files.internal("assets/blur.frag"))
|
||||
shader4096 = ShaderProgram(Gdx.files.internal("assets/4096.vert"), Gdx.files.internal("assets/4096.frag"))
|
||||
@@ -567,7 +574,7 @@ fun Float.round(): Float {
|
||||
|
||||
// ShapeRenderer alternative for rects
|
||||
fun SpriteBatch.fillRect(x: Float, y: Float, w: Float, h: Float) {
|
||||
this.draw(net.torvald.terrarum.worlddrawer.BlocksDrawer.tilesTerrain.get(1, 0), x, y, w, h)
|
||||
this.draw(Terrarum.textureWhiteSquare, x, y, w, h)
|
||||
}
|
||||
inline fun SpriteBatch.drawStraightLine(x: Float, y: Float, p2: Float, thickness: Float, isVertical: Boolean) {
|
||||
if (!isVertical)
|
||||
|
||||
Reference in New Issue
Block a user