Components problem

DionisMgn

12-05-2011 20:59:21

Hi.

I use the Hydrax 0.5.4 / OpenGLRenderer and found a bug: when I try to disable some unnecessary component throws an exception.

Components=Sun|Foam|Depth|Caustics : All is well.

Components=Sun|Foam|Depth :
[Hydrax] Creating depth material...
Cannot compile GLSL high-level shader : _Hydrax_Depth_VP Vertex shader failed to compile with the following errors:
ERROR: 0:8: error(#143) Undeclared identifier uWorld
ERROR: error(#273) 1 compilation errors. No code generated

High-level program _Hydrax_Depth_VP encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : _Hydrax_Depth_VP Cannot compile GLSL high-level shader : _Hydrax_Depth_VP Vertex shader failed to compile with the following errors:
ERROR: 0:8: error(#143) Undeclared identifier uWorld
ERROR: error(#273) 1 compilation errors. No code generated
in GLSLProgram::compile at /home/denis/SDKs/ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
Cannot compile GLSL high-level shader : _Hydrax_Depth_FP Fragment shader failed to compile with the following errors:
ERROR: 0:7: error(#143) Undeclared identifier uDistLimit
ERROR: error(#273) 1 compilation errors. No code generated

High-level program _Hydrax_Depth_FP encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : _Hydrax_Depth_FP Cannot compile GLSL high-level shader : _Hydrax_Depth_FP Fragment shader failed to compile with the following errors:
ERROR: 0:7: error(#143) Undeclared identifier uDistLimit
ERROR: error(#273) 1 compilation errors. No code generated
in GLSLProgram::compile at /home/denis/SDKs/ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
An exception has occured: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /home/denis/SDKs/ogre/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)DefaultWorkQueue('Root') shutting down on thread 0x23d54b0.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x28c3770 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x28c6540 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x28c73e0 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x28c6320 stopped.
*-*-* OGRE Shutdown

Components=Sun|Foam|Caustics:
[Hydrax] Creating water material...
GLSL compiled : _Hydrax_Water_VPVertex shader was successfully compiled to run on hardware.

Cannot compile GLSL high-level shader : _Hydrax_Water_FP Fragment shader failed to compile with the following errors:
ERROR: 0:50: error(#143) Undeclared identifier uWaterColor
ERROR: 0:50: error(#202) No matching overloaded function found mix
ERROR: 0:50: error(#160) Cannot convert from 'const float' to '3-component vector of float'
ERROR: error(#273) 3 compilation errors. No code generated

High-level program _Hydrax_Water_FP encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : _Hydrax_Water_FP Cannot compile GLSL high-level shader : _Hydrax_Water_FP Fragment shader failed to compile with the following errors:
ERROR: 0:50: error(#143) Undeclared identifier uWaterColor
ERROR: 0:50: error(#202) No matching overloaded function found mix
ERROR: 0:50: error(#160) Cannot convert from 'const float' to '3-component vector of float'
ERROR: error(#273) 3 compilation errors. No code generated
in GLSLProgram::compile at /home/denis/SDKs/ogre/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
An exception has occured: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /home/denis/SDKs/ogre/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)DefaultWorkQueue('Root') shutting down on thread 0x10d34b0.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x15c17c0 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x15c4590 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x7f5194000b70 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x7f51940008b0 stopped.
*-*-* OGRE Shutdown

Any ideas?

SanguinarioJoe

13-05-2011 08:44:29

Hi!

Yeah, I didn't test all the modules (desactivating it), so this type of problems could exist.

The problem is the next:

- MaterialManager.cpp builds the shaders source codes with needed uniform variables (inputs into the GPU from the CPU).
- When the shaders are built and compiled, MaterialManager sends all the uniforms variables values.
- If a uniform variable is not needed (so no declared into the shader), but MaterialManager try to send it, error is reported (and program stopped).

I will try to solve it as soon as posible.

Thanks for the report!

Regards,
Jose Luis Cercós Pita

SanguinarioJoe

21-05-2011 09:06:55

Twice problems must be solved! Look for the new version into the wiki page.

Also the Ubuntu packages has been updated to Ubuntu Natty Narwhal

Enjoy it!

Regards,
Jose Luis Cercós Pita