Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 This is what I now have for refraction. Maybe the shader has to be compiled 2 times and not once. I do not know. But with what you have done, the refraction no longer works. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 17, 2017 Share Posted June 17, 2017 am i understand correctly ? the problem is watermaterial cant take CustomMaterial Result for reflect? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 Yes I made you a simpler PG which works better : http://www.babylonjs-playground.com/#1SLLOJ#304 The result of refraction should be like this: http://www.babylonjs-playground.com/#1SLLOJ#19 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 Try to play with the inspector by disabling the reflection on each PG above to see the difference. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 I've just seen on my local project, the reverse happens. I have refraction of sand, but I have no texture sand on the terrain to load. strange. But I think the problem is about loading textures. Your patch has trigger another reaction. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 17, 2017 Share Posted June 17, 2017 http://www.babylonjs-playground.com/#1SLLOJ#305 yes i think the shader Uniforms (special sampler ) is not set correctly when we use watermaterial but about fps problem? i don't see it? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 Yes this seems random FPS. It seems better sometimes, but after several refreshing, it ended up going bad. Maybe it will go after this problem Uniforms correct. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 You could make it work on this PG (whitout noise), I do not understand the changes you made on your PG with the noise. http://www.babylonjs-playground.com/#1SLLOJ#304 Thanks Nasimi Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 17, 2017 Share Posted June 17, 2017 i think one camera get correct ( reflect & refract camera is correct ) i don't know about watermaterial workflow maybe need some read that before i answer *** it is not related for this post i see you use 8 more texture in your project i think you most use Atlas Texture and make one texture Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 I use a camera on the PG above. I need to use the 8 textures available for my terrain editor. Hence my choice of using ShaderBuilder because it allowed more textures What do I have to do ? I do not understand. You mean that I should not use 8 textures that are yet available with ShaderBuilder. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 17, 2017 Share Posted June 17, 2017 you can but it is limited in mobile i think Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 I do not use mobile. I am on PC 4 cores, graphics card GTX 960 4 GB It is not possible to have it work here? http://www.babylonjs-playground.com/#1SLLOJ#304 You made it work in the previous PG. And work also before your fix but with the FPS problem. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 I'll see tonight, I have to leave to take my daughter to a dance gala. Please Nasimi, help me to make it work on my PG. Thanks Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 17, 2017 Share Posted June 17, 2017 that need change some setting in water material i need time to understand that before Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 17, 2017 Author Share Posted June 17, 2017 @NasimiAsl On this PG I manage to reverse and receive the refraction of the ground, but no texture outside the water. In fact, it is, or one has the refraction of the soil and no texture on the ground, or one has the textures on the ground but no refraction. I do not know if that can help. I try to understand myself also why this product. Textures ground but not refraction : http://www.babylonjs-playground.com/#1SLLOJ#304 Refraction but not textures ground : http://www.babylonjs-playground.com/#1SLLOJ#306 Maybe @Luaacro can help you understand what is wrong. It is he who created the material of water. It can explain to you how it works or look at what does not go right to give you a track. Thanks Luaacro julien-moreau 1 Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 19, 2017 Share Posted June 19, 2017 @NasimiAsl what do you plan to modify in water material ? The problem comes from shader cache: - render normal : no clip plane - render refraction: clip plane is set So cache is reseted Dad72 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 19, 2017 Share Posted June 19, 2017 can you make sample with shaderMaterial not watermaterial? in PG Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted June 19, 2017 Share Posted June 19, 2017 I think using a mirror texture will reproduce the same problem i don't have my pc right now to repro Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 19, 2017 Author Share Posted June 19, 2017 I will not know how to reproduce this PG, I know nothing about shaderMaterial. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 19, 2017 Author Share Posted June 19, 2017 @NasimiAsl I recreate a PG with the idea of Luaacro. (using a mirror texture will reproduce the same problem) And indeed, the ground is not reflected in the panel. No mirror no waterMaterial. use MirrorTexture of StandardMaterial: http://www.babylonjs-playground.com/#EKFLA#267 Before your fix reflection and refraction worked, but there is going to be the problem of FPS. Now the shader is compiling once, but maybe it should be recompile when using refraction, reflection. Considering that it is only compiled once, the problem may be from there. Exemple with MirrorTexture : http://www.babylonjs-playground.com/#EKFLA#13 julien-moreau 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 20, 2017 Author Share Posted June 20, 2017 @NasimiAsl Have you been able to have a look at the extra PG you have requesting? I think your previous PR is not enough if the shader needs to be recompiled a second time. With the use of refraction, mirror, the shader needs to be recompiled a second time I suppose. You'd have to be able to do it manually or something. With function rebuild. I do not know. Thanks Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 20, 2017 Share Posted June 20, 2017 i am on that need more time Dad72 and julien-moreau 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 23, 2017 Author Share Posted June 23, 2017 @NasimiAsl Do you have a scheduled date to correct this? Thank you julien-moreau 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 27, 2017 Share Posted June 27, 2017 i make rendertarget with camera2 in that i don't see this error i am know looking the source of mirror plan to find answer i dont know how much time i need but i look that in this week maybe that complete soon julien-moreau 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 27, 2017 Author Share Posted June 27, 2017 2 hours ago, NasimiAsl said: i make rendertarget with camera2 in that i don't see this error Do you have an example please ? Even with a single camera I have this error. julien-moreau 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.