Hartha

Members
  • Content Count

    29
  • Joined

  • Last visited

About Hartha

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. doubling the mesh works for me but it cost in some cases, I will try to use CustomMaterial as @sable mention. Thank you guys for help.
  2. Thanks @JohnK for reply. yes I saw this tutorial, But the application I build will receive many models from the users so I can't modify the texture, I just need to color the backface with a color not applying texture to it.
  3. Hi, How I can color the mesh backface only, the mesh maybe has a texture or not. Thanks in advance.
  4. Hi everyone, Before my question, I find this forum very helpful, so thank you very much my questing is, what is the best way to separate the mouse input for active cameras, in this playground https://playground.babylonjs.com/#PBEA2U the two cameras move syn with each other, I wanna to move the right camera when the mouse is on the right side, and move the left camera when the mouse is on the left side. Thanks.
  5. Thanks @NasimiAsl for help, I guess it is not a bug, you can see the log : babylonjs WebGL: INVALID_OPERATION: uniform1f: location not for current program it is means that the active shader program is not the program which obtained the uniform locations from, we need to do something like gl.useProgram or update the uniform when we sure that the current active program is for the material we need to update.
  6. @Pryme8 in CustomMaterial class there is a function to add a uniform, but I don't find how to update it, and in the StanderdMaterial class I find how to add and update a uniform but I don't know where to add a discard condition -.-. Sorry for this but can you provide sample as Arte side ?
  7. @Arte Yes, it is not the best answer but it maybe be convenient to my case, Thanks Arte.
  8. Of course, https://playground.babylonjs.com/#AFRP1L#1
  9. @Pryme8 and @Arte, Thank you guys very mush, very helpful answers, I have to update the amount "y", but it seems not to work when I put mat.Fragment_Custom_Diffuse('if( vPositionW.y >'+ y +' ){ discard; }'); in registerBeforeRender, it just take the first call. I will look to the implementation to find a solution. Thank you very much again :).
  10. Hello guys, see the GIF please https://ibb.co/kZkrBR. I wonder how to do something like this in babylonjs, I did this in opengl project by sending a value to a uniform in fragment shader. should I do the same with babylonjs ? ; should I modify babylonjs shaders ?, or there is a better way to do that.
  11. Hi, mesh.enableEdgeRendering() has unexpected behavior when change renderingGroupId property for any mesh in the scene !!, is this a bug ? http://www.babylonjs-playground.com/#TYAHX#95
  12. Thanks @jellix for your answer, but I need to convert 3D-vector to 2D position, I found this way to do that : let p = BABYLON.Vector3.Project(vector, Identity, scene.getTransformMatrix(), camera.viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight())); But I don't know how to modify it to convert the vector according to specific camera, I tried to change the camera view port but it dose not change anything as shown in the playground. if anyone can explain the parameters it will be a good help, Thanks.
  13. HI, How to convert world point to screen 2D point using specific camera, I'm stuck and this is my try https://www.babylonjs-playground.com/#25RB80#3