Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am trying to render a cube that varys its tranperency (starts by alpha=0 to alpha =1) that is working but if i look through the cube i cant see things that use transperency themself. Like water, glass blocks or so.

While blocks like Ice or tinted glass do not have this issue. Is there an OpenGl option that fixes that? Or if not another solution?

Welcome to the quest to find the holy grail of computing: transparency sorting.

 

Whatever you did (which you didn't show your code) caused the polygons you tried to render to occlude the transparent blocks at a time when the triangle sorting was set to "nearest first".

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Here would be my renderer. By disableing the depthTest or depthMask I can achieve what I initialy wanted but it still seems a bit off (And i am not sure its the right way) and the rest of the block (the cube is just a part of one) is always rendered before the cube so that if looked at through the tinted face of the cube the rest does not seems to be affected.

 

https://pastebin.com/gXS6m7iP

  • Author

Okay thx for the key-word. I red something about the matter and what i can get from it, is that my current code does render both water and cube because i do not let the cube write to the depth buffer and thus the water is not occluded (And translucent and opaque triangles seem to be handled differently since the opaque blocks are never occluded by the cube). But still I do not sort the alpha triangles correctly so that in the current state water is rendered over the cube but does blend in a bit with the cubes color. Is that somewhere near the truth?

  • Author

By the way the problem with the rest of the cubes block was, that i set its render layer to (due to the glass part in it) to translucent. Ill just have to render the glass box in the renderer too

  • Author

Ok that worked I now exclude both the glass box and the cube inside from the depth buffer and it looks well enough. Thanks again for the key-word. Did not had a clue what to look for.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.