Search the Community
Showing results for tags 'textureformat'.
-
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: