mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 05:54:05 +09:00
save load screen
This commit is contained in:
@@ -375,7 +375,8 @@ infix fun Color.mulAndAssign(other: Color): Color {
|
||||
fun blendMul(batch: SpriteBatch) {
|
||||
// will break if the colour image contains semitransparency
|
||||
batch.enableBlending()
|
||||
batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_ONE_MINUS_SRC_ALPHA)
|
||||
// batch.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_ONE_MINUS_SRC_ALPHA)
|
||||
batch.setBlendFunctionSeparate(GL20.GL_DST_COLOR, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_DST_ALPHA, GL20.GL_SRC_ALPHA)
|
||||
}
|
||||
|
||||
fun blendScreen(batch: SpriteBatch) {
|
||||
@@ -390,7 +391,7 @@ fun blendDisable(batch: SpriteBatch) {
|
||||
|
||||
fun blendNormal(batch: SpriteBatch) {
|
||||
batch.enableBlending()
|
||||
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_SRC_ALPHA, GL20.GL_ONE)
|
||||
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE)
|
||||
|
||||
// ALPHA *MUST BE* PREMULTIPLIED //
|
||||
|
||||
@@ -424,8 +425,8 @@ fun gdxSetBlend() {
|
||||
|
||||
fun gdxSetBlendNormal() {
|
||||
gdxSetBlend()
|
||||
Gdx.gl.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_SRC_ALPHA, GL20.GL_ONE)
|
||||
//Gdx.gl.glBlendEquationSeparate(GL20.GL_FUNC_ADD, GL30.GL_MAX) // batch.flush does not touch blend equation
|
||||
Gdx.gl.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE)
|
||||
// Gdx.gl.glBlendFuncSeparate(GL20.GL_SRC_COLOR, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_SRC_ALPHA, GL20.GL_ONE)
|
||||
|
||||
// ALPHA *MUST BE* PREMULTIPLIED //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user