Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] TESR/OpenGL Transparency Sorting Issues


Izzy Axel
 Share

Recommended Posts

How do you properly implement transparency within a TESR with OGL?  When transparent things are viewed through the glass portion of my model without the liquid in it, it's just fine, but when the liquid is put in, viewing the liquid filled model through the glass of another copy of this model does this:

 

width=500 height=383https://dl.dropboxusercontent.com/u/10036065/2015-08-19_16.13.48.png[/img]width=500 height=383https://dl.dropboxusercontent.com/u/10036065/2015-08-19_16.13.36.png[/img]

 

 

It seems that relogging fixes this for an unknown reason, however viewing an empty model through a filled model then doesn't sort properly, it's very strange.

 

 

 

L107'>TESR

 

 

(The order of rendering is at the very bottom, in 'renderTileEntityAt')

Link to comment
Share on other sites

Hi

 

If your transparent pane is rendered first, it writes to the depth buffer, and then anything behind the pane that is rendered later (eg the second model, with the red liquid in your screenshot) is behind the glass, so it gets culled (doesn't render at all).

 

It all depends which model renders first.

 

It will help if you turn off writing to the depth buffer when drawing your transparent glass

glDepthMask(false)

and if you only render the panes which face the player (turn on back face culling).

 

The only robust way to fix it is to render all your transparent parts last, sorted in depth order with the other transparent objects in the scene.  This is a right pain in the butt.

 

-TGG

Link to comment
Share on other sites

Yeah, turning off the depthMask didn't really help, it seems to be an issue with newly placed models being viewed through models that were already placed.  The last part sounds like something the MC rendering engine is doing, and I can't touch it without something like an AT? (and that sounds like a very bad idea)

Link to comment
Share on other sites

Yeah, turning off the depthMask didn't really help, it seems to be an issue with newly placed models being viewed through models that were already placed.  The last part sounds like something the MC rendering engine is doing, and I can't touch it without something like an AT? (and that sounds like a very bad idea)

It can be done.  But it is an awful set of hacks and I reckon it's almost certainly better if you change your model so that it's not so visually annoying.

 

-TGG

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

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