• 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 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 necessarily faster to read RGB textures).
  2. 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. 🙂
  3. My bad, you're right, I'll come back tomorrow with a new PG if it works 🙂
  4. 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: (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: This code fails to create a RGB RenderTarget: Framebuffer is incomplete. I already pulled the last version of BJS and added gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1) everywhere but it doesn't help much. I'm struggling with this, I don't understand where something is different from the pure WebGL2 version. I verified InternalSizedFormat, InternalFormat and TextureType and they're OK. If anybody has an idea... Thanks in advance 😊 PeapBoy
  5. Of course Thank you very much and sorry for the stupid question
  6. 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 your help !
  7. PeapBoy

    Render color outside [0..1] range

  8. Woohoo! Doors of compiling are open again!
  9. Hi BitOfGold, Thanks for your help, I tried deleting and reinstalling, without success. And I had version 8.7.0 of Node, I installed 8.9.4, but again, no success. I'll install an Ubuntu bash, hoping it'll help (I'm on Windows). [Edit] Of course, nope.
  10. Hi, It's the first time I try to compile Babylon since I use a new computer so it's certainly linked. As always, I installed gulp as it's described here. Then I wanted to compile using gulp typescript command. But I get this error everytime: Without making any change, I still get the error. I can't compile BJS source anymore. Any idea why ? (And yes, it's really not compiled, I checked) Thanks in advance !
  11. PeapBoy

    Render color outside [0..1] range

    I would love to but I can't compile Babylonjs anymore, I have an error every time I run "gulp typescript"... Even when I didn't make any change. So it'll will take a little bit longer. [EDIT] Actually, I don't understand why I can't compile BJS, maybe you'll have any idea? I opened a question here.
  12. PeapBoy

    Render color outside [0..1] range

    Hi ! That's my code: _this._irradianceMap = new BABYLON.RenderTargetTexture(name, _this._mapSize, _this._scene, false, true, BABYLON.Engine.TEXTURETYPE_FLOAT, true); I always use floating point textures when it's possible. I thought it was enough but the above link says I also need to configure the frame buffer to expect floating point values or it will clamp the values to [0..1] even if the texture is a floating point texture. I always thought that the frame buffer data and the final texture were quite the same thing, so I'm confused. Though, this playground shows you're right for 2D textures ! HDR values are not clamped ! I'll try to make another PG with cube textures and see if I can reproduce my issue Final BLUE color means values have been clamped. Final GREEN value means values haven't been clamped. I already installed Spector.js extension for a while but I didn't manage to make it work in my apps, I should use it directly in code. (It works great in playground though ^^) [EDIT] Here is the playground for cube textures ! It's a bit difficult to understand as I copy paste a prototype of my app without removing what is useles for this PG. The only thing to look here is the shaders above which store big values and try to get them back. Final BLUE color means values have been clamped. Final GREEN value means values haven't been clamped. And this time, it's blue. I'm pretty sure I do something wrong but I don't know what. [EDIT 2] I just found that my final cube texture has a textureType UNSIGNED_INT instead of FLOAT, even if I specify BABYLON.Engine.TEXTURETYPE_FLOAT in the RenderTargetTexture. I think that's why my values are clamped. [EDIT 3] It seems to work when I replace gl.UNSIGNED_BYTE by gl.FLOAT in the BABYLON.Engine.CreateRenderTargetCubeTexture() function. Any reason for having hard coded UNSIGNED_BYTE for cube textures ?
  13. PeapBoy

    Render color outside [0..1] range

    Thanks for quick answer as always ^^ Well I'm quite sure that's what I did. And that's exactly why I was wondering about this range question ! Because when I sample this renderTargetTexture in the next shader, it has been mysteriously clamped to [0..1] ! But I'll confirm this tomorrow morning when I'll get my computer back.
  14. Hello BJS community ! I just began to understand HDR textures, gamma correction and so on in order to learn how to do IBL. In this process, I used BABYLON.HDRCubeTexture to convert my equirectangular HDR texture to a usable environment HDR cubemap, as explained here. Then, I need to apply a convolution on this cubemap to obtain my final irradiance cubemap that I will sample during IBL. To compute my irradiance cubemap from the environment cubemap, I use a RenderTargetTexture. Until there, everything works fine ! In the above tutorial link, the guy uses OpenGL and doesn't matter about having output color exceeding [0..1] range. It's useful to keep HDR textures until the last step where he will tone map its result. I learned the hard way that it's not as simple with WebGL. When I store color outside [0..1] range and then sample this result in another shader, result has been clamped between [0..1] range. This stackoverflow question taught me that not only I need to use a floating point texture but also I have to render to a floating point frame buffer. Or something like that, I never dived into pure WebGL code. To render to a floating point frame buffer, I need to enable the EXT_color_buffer_float extension (only available with WebGL 2), but it doesn't seem to be enough. I think I also need to configure the framebuffer with pure WebGL code. So, my question is: Is is yet possible to render color outside [0..1] range using BabylonJS at this time ? How ? If this not ready yet, I'll normalize and denormalize data at each step of course. But I would love to know if doing it in the ideal way is possible. Thank you a lot in advance !
  15. PeapBoy

    AA in WebGL2.0

    Hello guys, I just faced the chrome 63 bug and I saw this thread... Do you have any thread or github issue about it ? Do you already know how to handle it without disabling WebGL 2 ? Thanks, sorry for feeding a solved topic.