Jump to content


  • Content Count

  • Joined

  • Last visited

About PeapBoy

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, Sorry, in holidays 😅 You can find the PR here: https://github.com/BabylonJS/Babylon.js/pull/4839
  2. Well, I succeeded in compiling the code. I needed to add all the WebGL2 constants in babylon.webgl2.ts. There is still a lot I don't know about how works BJS 😅
  3. Yes, just adding the constants and updating the _getRGBABufferInternalSizedFormat(), _getInternalFormat() and _getWebGLTextureType() functions should definitely be enough to create any texture you want with BABYLON.RawTexture or BABYLON.RawCubeTexture ! 😊
  4. Hi ! Actually it's not a lot of work of adding a few constants but thanks haha Yes, principally Apple devices still don't support WebGL2 (so annoying...). But in such cases, BabylonJS already falls back on UNSIGNED_BYTE texture type. I admit I don't really get what you're trying to explain x) I don't really like the WebGL2Texture. I don't think the user should manage whether the devices support or not WebGL2, BabylonJS should do it as it already does, inside the Texture classes that already exist. Because it's one of the annoying task I expect Babylonjs to do for me. And
  5. Uh. Of course they exist 😠 Sorry but what should I do with gulp so it doesn't fail compiling because of the new WebGL2 constants ? I saw this in the code: // Constants this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit). if (this._gl.RGBA16F !== 0x881A) { this._gl.RGBA16F = 0x881A; // RGBA 16-bit floating-point color-renderable internal sized format. } if (this._gl.RGBA32F !== 0x8814) { this._gl.RGBA32F = 0x8814; // RGBA 32-bit floating-point colo
  6. Hi! 1. Noted. 2. So UNSIGNED_INT won't refer to UNSIGNED_INT and we'll invent UNSIGNED_INTEGER (or anything else) that actually will refer to UNSIGNED_INT, I really hate backwards compatibility 😅 3. It's fine for me, the impacted combinations that will not be possible don't affect my needs and I think they're very unsual. 4. Because RG is the good naming. It's gl.RED, gl.RG, GL.RGB and gl.RGBA. It's absolutely not important though, just my will to add a constant with the good naming, I didn't plan to remove gl.R at all, just a new one (RED) referring to the same as R. 5. My bad, y
  7. Hello ! As I'm currently playing with some unsigned integer textures, I would love to see BabylonJS support them. I'll do a PR as soon as possible, adding some (all ?) constants about internal formats (for instance Engine.TEXTUREFORMAT_RGBA_INTEGER) and texture types (for instance Engine.TEXTURETYPE_UNSIGNED_SHORT), and updating the function to retrieve the internal sized format in order to be able to return new values as gl.RGBA16UI. Does it seem ok for you ? Moreover, we're still using Engine.TEXTURETYPE_UNSIGNED_INT to refer to both gl.UNSIGNED_INT (only available for depth
  8. Hi Nabroski ! Thanks for the precious info. Render to a RGB16F texture was possible in WebGL1 with the EXT_color_buffer_half_float extension but isn't possible in WebGL2 anymore as this extension doesn't exist anymore. With the EXT_color_buffer_float extension available with WebGL2 though, it's possible to render to R16F, RG16F, RGBA16F, R32F, RG32F, RGBA32F and R11F_G11F_B10F texture. I didn't know the existence of the function uintBitsToFloat(), very handy ! Now, I should pay attention at the precision loss and at the performance gain of using RGB8 texture (not necessar
  9. Hi ! As we can see here, RGB format is not required by Opengl specifications (and therefore, by WebGL). That means it's supported for textures but not always for renderbuffers. That's why it worked in my PG which didn't render to a target. I'm sorry for wasting your time, I didn't know this. That's just not possible for now. 🙂
  10. My bad, you're right, I'll come back tomorrow with a new PG if it works 🙂
  11. Hello ! As WebGL2 comes with new texture formats, I decided to play a bit with them, and it seems to work well in pure WebGL2: https://playground.babylonjs.com/#RBQYSP (If it prints red, that means the RGB texture did work 🙂) I saw texture format has been added to createRenderTargetTexture function so I wanted to try it out. But whatever I do, I never achieve to create a RGB Render Target Texture. 😥 This code works to create a RGBA RenderTarget: https://playground.babylonjs.com/#RBQYSP#5 This code fails to create a RGB RenderTarget: https://playground.babylonjs.com/#R
  12. Hello, No bug, no issue today ! I was just wondering about the choice of linking materialDefines to subMeshes, rather than directly on materials themselves. Does that mean that two subMeshes could have the same material, but different defines ? As the material updates the defines depending on its own properties (not the properties of the subMesh), I can hardly see how it's possible. I would love to see an example of this if you have one. I mean, I'm missing something. I'm quite sure this choice has been made for a good reason. But I don't get why. Thanks for you
  13. Done https://github.com/BabylonJS/Babylon.js/pull/3715
  • Create New...