Comments (10)
It seems the tiling shader (or something else) is just overwriting the window when each layer is drawn.
from terrarum.
Currently the render now accepts FBO as an input, and that FBO is the one that the terrain is being drawn. Should be easy right? Blend terrain (a thing drawing now) over the wall (what's on the FBO). But can't get it to work, either my assumption is wrong or I missed a tiny little part, or use multiple FBOs which I want to avoid.
from terrarum.
Come and think of it, Torches and Clear Glasses (completely transparent) work, but regular Glass (semitransparent) won't? WTF?
from terrarum.
It must be fboRGB_lightMixed.inAction
part that something is wrong as using separate FBO for wall and terrain made the same result.
from terrarum.
fboRGB itself is okay. Download TGA extract • Pastebin Base64 (filetype: gz)
Edit: NO it isn't; look at the alpha channel, it should contain no semitransparency but this one does.
from terrarum.
Adding more test set
FBO and screenshot ZIP • Pastebin Base64 (filetype: pkzip)
As you can see, alpha channel is not quite right, as if something went wrong in the blending.
Unrelated note: the rim of the Clear Glass is wrong, I should've not put the transparency on the reflection.
from terrarum.
Gdx.gl.glBlendEquationSeparate(GL20.GL_FUNC_ADD, GL30.GL_MAX)
seems to do the trick, but now Crude Glass look like a sunscreen glass when placed against the open air. Also, use GL30 just for this? It kinda works but not optimal...
Edit: No, it doesn't do a trick.
from terrarum.
the separated equation AND setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_SRC_ALPHA, GL20.GL_ONE)
seems work? (requires newest GDX nightly 20190112)
Then what about alpha premul?
Answer: still need to be premultiplied
from terrarum.
now it works without BlendEquationSeparate? What the hell man.
from terrarum.
In summary: Using batch.setBlendFunctionSeparate seems to done a trick, and it requires latest GDX build. I'm closing the issue now but if any unintended behaviour occurs, please re-open.
from terrarum.
Related Issues (20)
- Try this for light calcuation? HOT 4
- Make Surface Cavern 2x Larger
- Procedurally generate game items
- Player can be stuck between 2 platforms, oscillating up and down HOT 4
- Resized actor has wrong sprite offset
- Segfault introduced with lightmap precalculation
- Certain combination of screen size produces segfault and more random memory-related errors HOT 1
- NOTICE: Use 8x lighting run HOT 1
- Player can clip though walls if x == 0 HOT 1
- Fake Ambient Occlusion between tile and wall HOT 1
- ACTORBLOCKs cast shade HOT 2
- Have input processing synced with Update and reintroduce Tile Changed Event Queue HOT 2
- Blocks Can Be Placed When Paused HOT 1
- Wires Won't Render Across the World Seam HOT 1
- Make Staircase Climbing Speed Dependent on the Stair Height HOT 1
- Chunked World Savegame Format for Fast Autosaving HOT 2
- IME Idea: Have both "Candidates" and "String Rewrite" system HOT 1
- Fixtures' actorblocks would overwrite platforms
- Platform allows the player to be "planted" to the ground slightly so that the feet tile is Y+1 than it should be
- [Ref only] Player can be stuck on specific platform and solid block arrangement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terrarum.