MackeyK24 Posted January 6, 2017 Share Posted January 6, 2017 Has anyone else used the latest nightly 2.6 alpha (on 1/5/2017)... Because now all of sudden all my mesh disposal code crashes... I go back to a version i had forked on (1/3/2017) and includes my #1641 onCollideEvent and particle system customShader... it works great... Somehow, Something got put in after 1/3/2017 in addition to my changes that is now crashing... Its hard to make a playground ... Is toolkit project. I will keep trying to investigate what could be the culprit that got got changed sine the last couple commits... Just wondering if anybody else is having an issue with the nightly build on 1/5/2017 @Deltakosh ... Has there been ANY new commits lately that deal with life cycle or disposal ??? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 6, 2017 Share Posted January 6, 2017 Hello I see no problem on my side: http://www.babylonjs-playground.com/#M7QUN Can you reproduce it on the PG? Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 6, 2017 Author Share Posted January 6, 2017 Nope, i cannot make a playground... is nested within the API... But now, all of the sudden (since that last 2.6 nightly update) the same code that has been working for awhile... now crashes on my dispose (with child meshes) with this error: [.Offscreen-For-WebGL-0x7fc45c042c00]GL ERROR :GL_INVALID_OPERATION : glDrawElements: No element array buffer bound Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 6, 2017 Share Posted January 6, 2017 without a repro I cannot help this seems to be related to the new webgl2 feature I added Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 6, 2017 Share Posted January 6, 2017 It works for me too. Can be by emptying the caches of your browser, the problem this will correct. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 7, 2017 Author Share Posted January 7, 2017 5 hours ago, Deltakosh said: without a repro I cannot help this seems to be related to the new webgl2 feature I added @Deltakosh Is way to complex for playground... and is in typescript. Can i disable webgl2 somehow to verify this is the culprit ??? This is really screwing me up big time... Now all kinds of code I have been working on for weeks... Just craps out now I can package the project up (Unity Package) and you can download and check out the whole project from a toolkit point of view. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 7, 2017 Share Posted January 7, 2017 Webgl2 AND vertex array object. This is the problem as I provided a fallback Can you try it on Edge? THere is no support for webgl2 and VAO. But this is unclear to me why I need Unity. You export .babylon files right? and you load these files in a browser, right? Even inside Unity. So you should be able to provide me a page and a .babylon file to test right? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 7, 2017 Share Posted January 7, 2017 I tried with child meshes but still no problem: http://www.babylonjs-playground.com/#M7QUN#1 With advanced textures and shaders, still no problem: http://www.babylonjs-playground.com/#ALFMC With shadows, no problem: http://www.babylonjs-playground.com/#1UBRGU With bones AND instances, no problem: http://www.babylonjs-playground.com/#1UBRGU#1 You'll have to help me there (i'm off for 3 days, I'm going to CES). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 7, 2017 Share Posted January 7, 2017 Perhaps you can point me in which file and at which line you have the issue (I assume that the code you mention is on the repo) Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 7, 2017 Author Share Posted January 7, 2017 I found the issue... Is does not like my Shader... That is what is giving those errors. My Additive Shader (to remove black backgound): OPTIONS: attributes: "position, normal, uv" uniforms: "worldViewProjection, _Color, _Brightness, _Blackness" samplers: "_MainTex" defines: "" VERTEX: attribute vec3 position; attribute vec3 normal; attribute vec2 uv; uniform mat4 worldViewProjection; precision highp float; varying vec2 vUV; void main(void) { gl_Position = worldViewProjection * vec4(position, 1.0); vUV = uv; } FRAGMENT: precision highp float; varying vec2 vUV; uniform vec4 _Color; uniform sampler2D _MainTex; uniform float _Blackness; uniform float _Brightness; void main(void) { vec4 baseColor = texture2D(_MainTex, vUV); float pixel = baseColor.r + baseColor.g + baseColor.b; if (pixel <= _Blackness) { gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0); } else { gl_FragColor = baseColor * _Color * _Brightness; } } ERRORS (SEVERAL PER FRAME): [.Offscreen-For-WebGL-0x7fc45c042c00]GL ERROR :GL_INVALID_OPERATION : glDrawElements: No element array buffer bound Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 7, 2017 Author Share Posted January 7, 2017 @Deltakosh ... I found the issue... Its any of my babylon GLSL shaders that enables "needsAlphaBlending"... If i take that off works great... (EXCEPT has black ground because the alpha is not working). So the webgl additions don't like the needsAlphaBlending on the Shader listed Above. OMG... Thanks god we found that issue... At least we know about where to start looking... and now all my new toolkit prefab system works great again (after i disable 'needsAlphaBlending'... Have UGLY SHOTS FOR NOW... but its working again). I am sure we can figure that shader stuff out Quote Link to comment Share on other sites More sharing options...
Sebavan Posted January 7, 2017 Share Posted January 7, 2017 This is really weird that it impacts dispose. Could you in chrome in debug gather the callstack for the crash ? I can t repro locally. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 10, 2017 Author Share Posted January 10, 2017 On 1/6/2017 at 7:04 PM, Deltakosh said: Webgl2 AND vertex array object. This is the problem as I provided a fallback Can you try it on Edge? THere is no support for webgl2 and VAO. But this is unclear to me why I need Unity. You export .babylon files right? and you load these files in a browser, right? Even inside Unity. So you should be able to provide me a page and a .babylon file to test right? Hey @Deltakosh attached is a zip file with all the regular .babylon scene files and scripts (index.html included) This is using a ShaderMateral with needsAlphaBlending = true... If you look in the .babylon file and change the only needsAplhaBlending that is true --> false... No longer get errors (although still get some funny things happen like the screen will go black and not show anything BUT the meshes are still in the game and show up and inspector ... still like meshes... just nothing gets rendered... Let your self blow up in game and let all asteroid from wave go by... everything will go black... BUT THIS ALL WORKED BEFORE the vertex array object stuff... Can we just disable that with an engine create options ???) Test Space Shooter Scene Download Test Space Shoot Scene Files NOTE: Check the console logs... There will be all kind of glDrawElements: No element array buffer bound errors Please take a look at when can Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2017 Share Posted January 10, 2017 I just fixed a related bug this morning. Do you mind testing with this version? Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 10, 2017 Author Share Posted January 10, 2017 6 hours ago, Deltakosh said: I just fixed a related bug this morning. Do you mind testing with this version? Holy Crap Batman... I think that did it Fixed both my 'NeedsAlphaBlending' and the Mysterious Black Screen when all item not visible... Thanks @Deltakosh ... You da Man Check it out now... Shots look good now (Don't pay attention to my explosions...Still working on the Particle System Prefabs) Test Space Shooter Scene Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 10, 2017 Author Share Posted January 10, 2017 Works Great Now Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 10, 2017 Author Share Posted January 10, 2017 Now i can move on to my new 'Animation State' component. Basically i will be allow multiple animation clips and create a Scene Manager API: this.manager.playAnimation("Idle", mesh) // Plays Transform Animations OR this.manager.playBoneAnimation("Walk", mesh.skeleton) // Plays Skeletal Animations WITH Blending Support... Something like that... Still working on Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 11, 2017 Share Posted January 11, 2017 I LOVE IT! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 11, 2017 Share Posted January 11, 2017 What about documentation ? Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted January 11, 2017 Author Share Posted January 11, 2017 46 minutes ago, Deltakosh said: What about documentation ? will be with the 1.0.1 version (I'm working on the initial game i am creating documentation from) GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.