### Report A Bug of BaseGame Template

There are no stupid questions, just stupid answers.

#### Report A Bug of BaseGame Template

zyzz1995
Posts: 9
Joined: Mon May 29, 2017 1:16 pm
Report A Bug of BaseGame Template

Today I tried to compile T3D with the BaseGame template, after i hit the “Launch World Editor” button, some errors occurred(see the pics attached).

From the info "Failed to open the include 'shaders/common/torque.hlsl' ", i think this is a path bug, may be the developers forgot to update the include file path in some shader files, casue the "torque.hlsl" is no longer in the "shaders/common" path but in the "shaders/" path in the BaseGame template. I've not located those files for now, hope that the developers will see this and fix the bug ASAP.

Not sure here is the right place to report a bug.

UPDATE: Find some info in the console.log file

Code: Select all

C:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(72,0): {Fatal-ISV} - Failed to open include 'shaders/common/torque.hlsl'.failed to compile shader: C:\Users\Administrator\Documents\GitHub\Torque3D\My Projects\LearnT3DBaseGame\game\data\shaderCache\b524839793fade4e_V.hlsl(7,10): error X1507: failed to open source file: 'shaders/common/torque.hlsl'C:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(950,0): {Fatal-ISV} - Unable to compile shader!Failed to initialize material 'Grid_512_Grey'[Material::mapMaterial] - Cannot map unnamed MaterialC:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(72,0): {Fatal-ISV} - Failed to open include 'shaders/common/torque.hlsl'.failed to compile shader: C:\Users\Administrator\Documents\GitHub\Torque3D\My Projects\LearnT3DBaseGame\game\data\shaderCache\efef832dc37c8755_V.hlsl(6,10): error X1507: failed to open source file: 'shaders/common/torque.hlsl'C:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(950,0): {Fatal-ISV} - Unable to compile shader!Failed to initialize material '(null)'[Material::mapMaterial] - Cannot map unnamed MaterialC:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(72,0): {Fatal-ISV} - Failed to open include 'shaders/common/torque.hlsl'.failed to compile shader: C:\Users\Administrator\Documents\GitHub\Torque3D\My Projects\LearnT3DBaseGame\game\data\shaderCache\efef832dc37c8755_V.hlsl(6,10): error X1507: failed to open source file: 'shaders/common/torque.hlsl'C:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(950,0): {Fatal-ISV} - Unable to compile shader!Failed to initialize material '(null)'C:\Users\Administrator\Documents\GitHub\Torque3D\Engine\source\gfx\D3D11\gfxD3D11Shader.cpp(72,0): {Fatal-ISV} - Failed to open include 'shaders/common/torque.hlsl'.failed to compile shader: C:\Users\Administrator\Documents\GitHub\Torque3D\My Projects\LearnT3DBaseGame\game\data\shaderCache\a1a7a101cca9ce72_V.hlsl(6,10): error X1507: failed to open source file: 'shaders/common/torque.hlsl'

And the same problem occurs when i use OpenGL as the render. It turns out my guess may be wrong, the problem is not exist in some shader file but in this "Engine\source\gfx\D3D11\gfxD3D11Shader.cpp" file.

UPDATE2:

I did little more research, found the problem should be in "Engine\source\shaderGen\shaderGen.cpp". I noticed that in line 52 and line 129, there was a string "shaders/common" and a variable named smCommonShaderPath which should control where should the auto-generated shaders go:

Code: Select all

line52: String ShaderGen::smCommonShaderPath("shaders/common");

Code: Select all

line129: smCommonShaderPath = String(Con::getVariable("$Core::CommonShaderPath", "shaders/common")); And the smCommonShaderPath should be able to change from the script, and i found it in game\core\main.cs: Code: Select all line42:$Core::CommonShaderPath = "core/shaders";

But i just don't konw why this line does not take effect. The game\core\main.cs should be executed. I am confused now.

Attachments

2017-09-10_122751.png (3.02 KiB) Viewed 188 times
2017-09-10_122734.png (3.29 KiB) Viewed 188 times
Last edited by zyzz1995 on Sun Sep 10, 2017 5:44 pm, edited 3 times in total.

#### Re: Report A Bug of BaseGame Template

Duion
Posts: 869
Joined: Sun Feb 08, 2015 1:51 am

Report bugs with Torque3D here: https://github.com/GarageGames/Torque3D/issues
It is not wrong to discuss things in the forum, but as an issue on Github it is more likely to be seen.
If you want quick feedback use the IRC channel, so you can discuss in advance if you should report the issue and where.

#### Who is online

Users browsing this forum: No registered users and 2 guests