hw3web Posted March 5, 2014 Share Posted March 5, 2014 Is there any chanse to put BABYLON.Engine.ShadersRepository = "../Shaders"; folder as source up one ( or more ) - I get [13:34:35.507] Error: 404 @ Unable to load ./Shaders/Water/water.vertex.fx:1 Thank you Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 5, 2014 Share Posted March 5, 2014 You can redefine the folder where your shaders are stored, with this line : BABYLON.Engine.ShadersRepository = "../Shaders/"; Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 5, 2014 Author Share Posted March 5, 2014 I did try , still this same problem , I tried : "../Shaders/";"../Shaders";"./Shaders";".../Shaders"; but funny it dose say : [14:47:38.299] Error: 404 @ Unable to load ./Shaders/Water/water.vertex.fx:1 ----- why there is . when I try with many other .. ... It is working when folder Shaders is in this same folder Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 5, 2014 Share Posted March 5, 2014 Can you give us the hierarchy of your project please ? Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 5, 2014 Author Share Posted March 5, 2014 Project├── index.html├── JS - Folder with jquary , babylon and others js files lib ├── ALL│ ├── sceneall.php - That where I call Shaders – there is script JS in file│ └── Shaders - Just for now to work it is copy of folder (Shaders) from folder UP - that I want to remove and access ../Shaders│ │ ├── default.fragment.fx│ │ ├── default.vertex.fx.....│ │ ├── sprites.vertex.fx│ │ └── Water│ │ ├── bump.png│ │ ├── water.fragment.fx│ │ ├── waterMaterial.js│ │ └── water.vertex.fx├── Shaders│ ├── default.fragment.fx│ ├── default.vertex.fx...│ ├── sprites.fragment.fx│ ├── sprites.vertex.fx│ └── Water│ ├── bump.png│ ├── water.fragment.fx│ ├── waterMaterial.js│ └── water.vertex.fx└── style.css Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 5, 2014 Share Posted March 5, 2014 Do you authorize .babylon and .fx MIME type on your web server? Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 5, 2014 Author Share Posted March 5, 2014 authorize - i am working on localhost I load them in header of page , and they work from this same folder is only when I try access them from upper folder Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 6, 2014 Share Posted March 6, 2014 Do you use IIS as web server? Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 6, 2014 Author Share Posted March 6, 2014 Hi , no I am using Linux base control by CPanel, but I authorize it in .htaccess so it is working , it just don't want when I put "../Shaders/" , when I do "Shaders" is fine, that a reasons I copy all Shaders in to folder All that is on this same level but I would like to remove it as it is silly to have double copy of this same folder Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 6, 2014 Share Posted March 6, 2014 Oh this is normal. Sorry about that. .. is not supported Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 6, 2014 Share Posted March 6, 2014 You can use /shaders ? Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 6, 2014 Author Share Posted March 6, 2014 no, I tried '/shaders' , '/shaders/' ..... - no working Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 6, 2014 Share Posted March 6, 2014 BABYLON.Engine.ShadersRepository must be loaded before BABYLON.Engine(canvas, true) Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 6, 2014 Author Share Posted March 6, 2014 I did put before , try after still nothing .. any chance how code should like , i put: engine = new BABYLON.Engine(canvasp, true); scene = new BABYLON.Scene(engine);BABYLON.Engine.ShadersRepository = "../Shaders/"; and tried : BABYLON.Engine.ShadersRepository = "../Shaders/";engine = new BABYLON.Engine(canvasp, true);scene = new BABYLON.Scene(engine); non of that work, but if folder Shaders is in this folder not folder higher is all fine ! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 7, 2014 Share Posted March 7, 2014 BABYLON.Engine.ShadersRepository = "./../../Shaders/";engine = new BABYLON.Engine(canvasp, true);scene = new BABYLON.Scene(engine);Or BABYLON.Engine.ShadersRepository = "./../Shaders/";engine = new BABYLON.Engine(canvasp, true);scene = new BABYLON.Scene(engine);OrBABYLON.Engine.ShadersRepository = "http://127.0.0.1/Project/Shaders/"; //External linkengine = new BABYLON.Engine(canvasp, true);scene = new BABYLON.Scene(engine); Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 7, 2014 Author Share Posted March 7, 2014 why any of them don't work for me ( I use local server address of mine , which I though it will be the best but No working !? in lines above I got<script src="../Shaders/Water/waterMaterial.js"></script> and if I put copy of Shaders folder in this folder all working but if I put to folder up just stop Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 7, 2014 Share Posted March 7, 2014 and with a full link ? No ? BABYLON.Engine.ShadersRepository = "http://127.0.0.1/Project/Shaders/"; May be that Babylon does not accept folder down ( ../../dossier/). This up (dossier/) Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 7, 2014 Author Share Posted March 7, 2014 but even full address , did you ever try ? maybe is other setting of my server ( local host) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 7, 2014 Share Posted March 7, 2014 Me I made: BABYLON.Engine.ShadersRepository = "Projets/"+ProjetName+"/Data/"; It works. I does not written the Shaders folder To tryBABYLON.Engine.ShadersRepository = "./../"; Quote Link to comment Share on other sites More sharing options...
hw3web Posted March 7, 2014 Author Share Posted March 7, 2014 Now I totally misunderstand, I put BABYLON.Engine.ShadersRepository = "blabla"; but as long folder Sheders is in this same folder is all fine !??! ? anyone !? -- is there other super ShadersRepo address ? Quote Link to comment Share on other sites More sharing options...
gwenael Posted March 15, 2014 Share Posted March 15, 2014 Could you add these lines at the beginning of your sceneall.php just to check the current directory? We never know.<?php// current directoryecho getcwd() . "\n";?> 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.