Game Development Community

T3D 1.1 Beta 3 - Inconsistent FPS and Full Project Console Warnings - LOGGED - Fixed

by Steve Acaster · in Torque 3D Professional · 09/20/2010 (3:04 pm) · 7 replies

I'll skip to the chase ...

Full Project has the following shader warnings that FPS Example does not:
C:/Torque/Torque 3D 2009 Pro 1.1 Beta 3/My Projects/Yorks/game/shaders/common/scatterSkyV.hlsl(8,11): warning X3207: Initializer used on a global 'const' variable. This requires setting an external constant. If a literal is desired, use 'static const' instead.
C:/Torque/Torque 3D 2009 Pro 1.1 Beta 3/My Projects/Yorks/game/shaders/common/scatterSkyV.hlsl(9,13): warning X3207: Initializer used on a global 'const' variable. This requires setting an external constant. If a literal is desired, use 'static const' instead.
C:/Torque/Torque 3D 2009 Pro 1.1 Beta 3/My Projects/Yorks/game/shaders/common/scatterSkyV.hlsl(12,13): warning X3207: Initializer used on a global 'const' variable. This requires setting an external constant. If a literal is desired, use 'static const' instead.
C:/Torque/Torque 3D 2009 Pro 1.1 Beta 3/My Projects/Yorks/game/shaders/common/scatterSkyV.hlsl(13,13): warning X3207: Initializer used on a global 'const' variable. This requires setting an external constant. If a literal is desired, use 'static const' instead.

Fixed in 1.1P 10 april 2011

#1
09/20/2010 (3:52 pm)
Logged by Matt Taylor, 9/20/2010, TQA-1125
#2
09/20/2010 (5:09 pm)
From those warnings it soulds like the scatter sky shader is different on one project to the other or that your running one or the other with a different version of D3DX.

The fix for the warnings is removing the unused consts at the top of scatterSkyV.hlsl.
#3
09/20/2010 (6:09 pm)
Odd...the FPS Example's shaders\common should be an exact copy of the Full template's shaders\common (which is where scatterSkyV.hlsl lives).

Could you do a diff of the two files and see if there are any differences?

Is ScatterSky being used in Full anywhere? Perhaps you aren't seeing the errors because the shader isn't being compiled?
#4
09/20/2010 (8:21 pm)
Winmerge says the files are identical ... and so does my Mk.1 Eyeball.

edit:
having said that ...

Original build/projects don't appear have said warning ... only rebuilt versions -> note no source changes, just a rebuild. I'm using VS2008express, haven't noticed this issue in previous version of T3D.

I would require more idiot-proof instructions to mess around shaders/recompiling successfully ...
#5
09/20/2010 (11:50 pm)
Doing what the console warnings said -> Turning the 4 "const" to "static const" cleared up the warnings ...
... though I'm marginally baffled as all my Dx stuff and drivers are up to date.
I think marginally baffled is a permenant state of being these days :P
#6
09/21/2010 (12:11 am)
I suspect that the shipped binaries are built against a different version of the DX SDK than what your using Steve. That can sometimes cause different warnings in shader compiles.

Anyway... i fixed it by removing those unused constants. It will be fixed in the next release.

Thanks for the report!
#7
09/21/2010 (12:36 am)
Ah..yes...that makes sense =)

The shipped binaries are actually being compiled against a fairly old DirectX SDK. I should update that =P