Re: [4.60] shader : reflection (env_map)
Publié : mar. 12/avr./2011 9:08
kelebrindae, entre la 1.6 et la 1.7 , ogre gère différemment les materials , si les shaders sont écrit en HLSL ou GLSL , ca ne pose aucun problème.
Forums PureBasic - Français
https://www.purebasic.fr/french/
et on espère que ce n'est que le débutFred a écrit :Sympa les exemples !
Code : Tout sélectionner
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader BumpMapFPSpecular Errors:
error X3539: ps_1_x is no longer supported; use /Gec in fxc to automatically upgrade to ps_2_0
error X3539: Alternately, fxc's /LD option allows use of the old compiler DLL
Code : Tout sélectionner
10:31:26: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader AmbientOneTexture Errors:
D:\Programmation\PureBasic\projects\shaders\normalMaps - multilights\memory(33,14): error X3025: global variables are implicitly constant, enable compatibility mode to allow modification
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: High-level program AmbientOneTexture encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader AmbientOneTexture Errors:
D:\Programmation\PureBasic\projects\shaders\normalMaps - multilights\memory(33,14): error X3025: global variables are implicitly constant, enable compatibility mode to allow modification
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(10): setting of constant failed
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(11): setting of constant failed
10:31:26: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader BumpMapVPSpecular Errors:
D:\Programmation\PureBasic\projects\shaders\normalMaps - multilights\memory(52,14): error X3025: global variables are implicitly constant, enable compatibility mode to allow modification
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: High-level program BumpMapVPSpecular encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader BumpMapVPSpecular Errors:
D:\Programmation\PureBasic\projects\shaders\normalMaps - multilights\memory(52,14): error X3025: global variables are implicitly constant, enable compatibility mode to allow modification
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(23): setting of constant failed
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(24): setting of constant failed
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(25): setting of constant failed
10:31:26: OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader BumpMapFPSpecular Errors:
error X3539: ps_1_x is no longer supported; use /Gec in fxc to automatically upgrade to ps_2_0
error X3539: Alternately, fxc's /LD option allows use of the old compiler DLL
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: High-level program BumpMapFPSpecular encountered an error during loading and is thus not supported.
OGRE EXCEPTION(3:RenderingAPIException): Cannot assemble D3D9 high-level shader BumpMapFPSpecular Errors:
error X3539: ps_1_x is no longer supported; use /Gec in fxc to automatically upgrade to ps_2_0
error X3539: Alternately, fxc's /LD option allows use of the old compiler DLL
in D3D9HLSLProgram::loadFromSource at OgreD3D9HLSLProgram.cpp (line 223)
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(37): setting of constant failed
10:31:26: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1423)
10:31:26: Compiler error: invalid parameters in cube.material(38): setting of constant failed
oui, le mieux étant d'avoir les deuxkelebrindae a écrit :@Blendman: ou bien, un endroit sur le forum (français ou anglais) pour mettre en "sticky" les shaders développés par les utilisateurs; avoir une petite liste de shaders à dispo pour éviter de les re-développer à chaque fois, ça pourrait être pratique.![]()
- SpotLightRange(1,20,90,20) fait planter le fichier et le débugger
- lightpower() ne semble pas fonctionner : comment l'utilise t-on ?
- sous windows, on a toujours le bug des shadows sur la 4.60beta 2 (pas sur ce fichier, mais sur l'autre fichier, avec le puf et les barrières)
ok, et ce sera intégré pour la 4.60 ou sans doute après j'imagine ?G-Rom a écrit :- Il faut que ta lumière soit un spot , il faut maitrisé les vecteurs pour leur donné une direction LumDir = normalise (LumTarget - LumPos) , il manque une fonction d'atténuation , elle est codé , non implémenté.
Ah ok. Et peut-on gérer l'intensité d'une lumière ?LightPower() n'est là que pour le HDR , son utilisation est inutile dans ton cas de figure
ce qui est étrange c'est que visiblement, avec les mêmes meshs, sous linux ça ne fait pas ce bug (car tu ne l'avais pas, mais tous ceux qui ont tester sous windows l'avaient.- je pense que cela viens de tes meshs , si c'est un bug inhérent à ogre , je ne peut rien faire mis à part un rapport.
Code : Tout sélectionner
cgc.exe -entry ambientOneTexture_vp -profile hlsl10v example_Basic.cg -o ambientOneTexture.hlsl
cgc.exe -entry specular_vp -profile hlsl10v example_bumpmapping.cg -o specular_vp.hlsl
cgc.exe -entry specular_fp -profile hlsl10f example_bumpmapping.cg -o specular_fp.hlsl
Code : Tout sélectionner
in float3 _tangent : TEXCOORD1
Code : Tout sélectionner
in float3 _tangent : TANGENT