
rockefeller
Members-
Content Count
8 -
Joined
-
Last visited
About rockefeller
-
Rank
Newbie
-
-
Custom texture mipmaps for roughness
rockefeller replied to rockefeller's topic in Questions & Answers
Something like that. Thanks for the xamples, but I've managed to do it using cube maps IBLBaker and textureCubeLodEXT -
Custom texture mipmaps for roughness
rockefeller replied to rockefeller's topic in Questions & Answers
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 -
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
-
-
solved Access texcoord1 (or more) as attribute
rockefeller replied to rockefeller's topic in Questions & Answers
I only tried uv, uv0, and uv1. I've just tried uv2 and it worked, thanks- 2 replies
-
- vertex shader
- lightmap
-
(and 1 more)
Tagged with:
-
-
Can't change the TextureFormat for a RenderTargetTexture
rockefeller replied to rockefeller's topic in Bugs
Done, here's the issue https://github.com/BabylonJS/Babylon.js/issues/3901- 5 replies
-
- rendertargettexture
- textureformat
-
(and 1 more)
Tagged with:
-
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
- 2 replies
-
- vertex shader
- lightmap
-
(and 1 more)
Tagged with:
-
Can't change the TextureFormat for a RenderTargetTexture
rockefeller replied to rockefeller's topic in Bugs
Can I use raw textures as rendertargets? if not, it doesn't help me much- 5 replies
-
- rendertargettexture
- textureformat
-
(and 1 more)
Tagged with:
-
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 };
- 5 replies
-
- rendertargettexture
- textureformat
-
(and 1 more)
Tagged with: