Blinn-Phong and Torque3D - Download
by Ryan Mounts · in Torque 3D Professional · 05/27/2011 (11:15 am) · 9 replies
For anyone who wants to try out my Blinn-Phong changes, you can download it here. Some people have been having trouble with MediaFire lately. My apologies, but I'm at work and can't upload this anywhere else. So feel free to mirror this download. I put this in the private forums because it contains several source code files, as you can see below.
Once downloaded, unzip "Blinn-Phong.zip" in your "Torque 3D Pro 1.1 Preview" folder. It will overwrite these files, so merge them manually if you want to preserve your own work:
Source Files:
\Engine\source\lighting\advanced\ advancedLightBufferConditioner.cpp
\Engine\source\lighting\advanced\hlsl\ advancedLightingFeaturesHLSL.cpp
\Engine\source\lighting\advanced\glsl\ advancedLightingFeaturesGLSL.cpp
\Engine\source\materials\ materialDefinition.cpp
\Engine\source\materials\ materialDefinition.h
\Engine\source\materials\ processedShaderMaterial.cpp
\Engine\source\materials\ processedShaderMaterial.h
\Engine\source\shaderGen\ shaderGenVars.cpp
\Engine\source\shaderGen\ shaderGenVars.h
Script Files:
\Examples\FPS Example\game\tools\materialEditor\gui\ guiMaterialPropertiesWindow.ed.gui
\Examples\FPS Example\game\tools\materialEditor\scripts\ materialEditor.ed.cs
Shader Files:
\Examples\FPS Example\game\shaders\common\lighting\advanced\ pointLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\ spotLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\ vectorLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ pointLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ spotLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ vectorLightP.hlsl
Compile T3D and enjoy. I did not have a chance to unzip this into a clean 1.1 Preview install, so just let me know if something seems to be missing. Also, I do not own a Mac, so I could not test the GLSL stuff, even though I tried to replicate the changes for you guys. Without compiling it on a Mac, though, I couldn't really tell if the lighting equation was different, but it did appear like the auto-generated conditioners were slightly different from the HLSL. So just a heads up... it might be a total fail on a Mac.
Once downloaded, unzip "Blinn-Phong.zip" in your "Torque 3D Pro 1.1 Preview" folder. It will overwrite these files, so merge them manually if you want to preserve your own work:
Source Files:
\Engine\source\lighting\advanced\ advancedLightBufferConditioner.cpp
\Engine\source\lighting\advanced\hlsl\ advancedLightingFeaturesHLSL.cpp
\Engine\source\lighting\advanced\glsl\ advancedLightingFeaturesGLSL.cpp
\Engine\source\materials\ materialDefinition.cpp
\Engine\source\materials\ materialDefinition.h
\Engine\source\materials\ processedShaderMaterial.cpp
\Engine\source\materials\ processedShaderMaterial.h
\Engine\source\shaderGen\ shaderGenVars.cpp
\Engine\source\shaderGen\ shaderGenVars.h
Script Files:
\Examples\FPS Example\game\tools\materialEditor\gui\ guiMaterialPropertiesWindow.ed.gui
\Examples\FPS Example\game\tools\materialEditor\scripts\ materialEditor.ed.cs
Shader Files:
\Examples\FPS Example\game\shaders\common\lighting\advanced\ pointLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\ spotLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\ vectorLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ pointLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ spotLightP.hlsl
\Examples\FPS Example\game\shaders\common\lighting\advanced\gl\ vectorLightP.hlsl
Compile T3D and enjoy. I did not have a chance to unzip this into a clean 1.1 Preview install, so just let me know if something seems to be missing. Also, I do not own a Mac, so I could not test the GLSL stuff, even though I tried to replicate the changes for you guys. Without compiling it on a Mac, though, I couldn't really tell if the lighting equation was different, but it did appear like the auto-generated conditioners were slightly different from the HLSL. So just a heads up... it might be a total fail on a Mac.
#2
08/15/2012 (11:43 am)
Can it be easily ported to 1.2?
#3
08/15/2012 (5:21 pm)
I add this resource on the next commit on the CE :)
#4
10/01/2012 (6:13 am)
Does the MIT version of the engine already have this ?
#5
"Does the MIT version of the engine already have this ? "
[/Quote]
nope,
you need to add that manually.
10/01/2012 (9:26 am)
[Quote Bolohan Razvan]"Does the MIT version of the engine already have this ? "
[/Quote]
nope,
you need to add that manually.
#6
10/03/2012 (1:44 pm)
Thanks for this :-)
#7
10/07/2012 (6:09 am)
I get this errors when i try to compile:Error 26 error C2039: 'lightSpotFalloff' : is not a member of 'ShaderGenVars' e:\Torque3D\Engine\source\lighting\shadowMap\lightShadowMap.cpp 513 Error 27 error C2065: 'lightSpotFalloff' : undeclared identifier e:\Torque3D\Engine\source\lighting\shadowMap\lightShadowMap.cpp 513 Error 28 error C2039: 'lightSpotFalloff' : is not a member of 'ShaderGenVars' e:\Torque3D\Engine\source\lighting\basic\basicLightManager.cpp 345 Error 29 error C2065: 'lightSpotFalloff' : undeclared identifier e:\Torque3D\Engine\source\lighting\basic\basicLightManager.cpp 345
#8
10/07/2012 (8:28 am)
without looking at it, I'd say make that "spotLightFalloff" and see what happens....
#9
Thanks.
10/07/2012 (8:39 am)
I manage to make it work and indeed the control over specularity is better.Thanks.
Associate Rene Damm