rockefeller

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. Something like that. Thanks for the xamples, but I've managed to do it using cube maps IBLBaker and textureCubeLodEXT
  2. Found this https://doc.babylonjs.com/how_to/physically_based_rendering very helpful. I've also enabled the EXT_shader_texture_lod extension (as Webgl doesn't support textureCubeLod) and I now use textureCubeLodEXT instead of textureCube with a bias. I've taken a look at the default shader and I think it would be better to also use textureCubeLodEXT instead of textureCube for roughness. textureCube creates artifacts and changes with distance. more info here: https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/ @Deltakosh
  3. Is there a way to generate custom mipmaps for a texture and save it? For instance, Unity preblurs the mips of a cube map (using specular convolution) in order to accurately simulate roughness. https://docs.unity3d.com/Manual/class-Cubemap.html
  4. I only tried uv, uv0, and uv1. I've just tried uv2 and it worked, thanks
  5. Done, here's the issue https://github.com/BabylonJS/Babylon.js/issues/3901
  6. Hello, Is there a way to access the texcoord1 in the shader as an attribute? I know I can access texcoord0 using attribute vec2 uv; but uv0/uv1/uv2 etc don't seem to do anything. This is trivial for using lightmaps
  7. Can I use raw textures as rendertargets? if not, it doesn't help me much
  8. Hey guys, I want to create a custom RenderTargetTexture of type BABYLON.Engine.TEXTUREFORMAT_LUMINANCE but it doesn't work. here's my code: textureFormat is always 5 (probably TEXTUREFORMAT_RGBA), regardless of what I set it to be. // Render target var renderTarget = new BABYLON.RenderTargetTexture( "depth", 128, // res scene, false, // generateMipMaps true, // doNotChangeAspectRatio BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT, // type false, // isCube BABYLON.Texture.BILINEAR_SAMPLINGMODE, // samplingMode false, // generateDepthBuffer false, // generateStencilBuffer false); //isMulti renderTarget.noMipmap = true; renderTarget.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE; renderTarget.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; renderTarget.wrapR = BABYLON.Texture.CLAMP_ADDRESSMODE; renderTarget.textureFormat = BABYLON.Engine.TEXTUREFORMAT_LUMINANCE; renderTarget.hasAlpha = false; renderTarget.gammaSpace= false; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// My wild guess is that the constructor doesn't pass textureFormat to _renderTargetOptions this._renderTargetOptions = { generateMipMaps: generateMipMaps, type: type, samplingMode: samplingMode, generateDepthBuffer: generateDepthBuffer, generateStencilBuffer: generateStencilBuffer };