JavaScript WebGL Semi-transparent object hiding objects ahead

I'm making game like minecraft in javascript using WebGL. I have a problem with semi-transparent objects. First I tried to render all objects with depth-test and blending

gl.blendEquation( gl.FUNC_ADD );
gl.blendFunc( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA );

But using this method i must sorting all objects, to render correctly. Now I'm trying to first render normal objects with depth-testing and without blending. Next render semi-transparent with blending and without depth-testing. That render semi-transparent objects good, but its hidding objects ahead.

Screens:

enter image description here enter image description here

Answer:1

For example: for (var idx = 0, len = lines.length; idx < len; idx += 1) { /^regexp?/i.test(lines[idx]); } Would the following be more efficient? var pattern = /^regexp?/i; for (var idx = 0, ...

For example: for (var idx = 0, len = lines.length; idx < len; idx += 1) { /^regexp?/i.test(lines[idx]); } Would the following be more efficient? var pattern = /^regexp?/i; for (var idx = 0, ...

  1. does in javascript

Is there a workaround? I am running my own custom scrollbar script as opposed to using the built in browsers functionality. I prefer to use SVG for my image elements for a number of reasons, but one, ...

Is there a workaround? I am running my own custom scrollbar script as opposed to using the built in browsers functionality. I prefer to use SVG for my image elements for a number of reasons, but one, ...

Before I explain the problem, I want to describe short what I am trying to achieve I have made 5 diagrams and one NavigationList. The NavigationList consists of pure HTML that displays a list of ...

Before I explain the problem, I want to describe short what I am trying to achieve I have made 5 diagrams and one NavigationList. The NavigationList consists of pure HTML that displays a list of ...

How can you get the id of a table when you click an input element? I don't need the rowId etc. I've tried parentNode.id but I can't seem to get the id. In the end I'd like to do something like this: ...

How can you get the id of a table when you click an input element? I don't need the rowId etc. I've tried parentNode.id but I can't seem to get the id. In the end I'd like to do something like this: ...

  1. from html table to csv
  2. from html table to json
  3. from html table to pdf
  4. from table html
  5. html from table to div
  6. in html table tag
  7. in html table border
  8. in html table border color