Seems it is not an ATI problem because I got the same result and glsl shader compile errors with GeForce 6600.gfxstyler wrote:same here (glsl shader failed to compile)
seems to be some nasty ati bug ...
ATI CARDS SUCK BADLY!
IRR|Cinema studio: some water for the thirsty
ahhh sorry i uploaded faulty shaders (they compile fine on fx series)
open blurv.frag
replace
colorc.rgb += texture2D
with
colorc += texture2D
open final.frag
delete
colorc.a = texture2D(alpha,gl_TexCoord[0]);
the link contains the fix.
It is an ati bug i think since gfxstyler said the glsl irrlicht sample doesnt work(only assembler did) on his ati card.
the best solution would be hlsl but from what i have tried the irrlicht hlsl only accepts the first texture...
open blurv.frag
replace
colorc.rgb += texture2D
with
colorc += texture2D
open final.frag
delete
colorc.a = texture2D(alpha,gl_TexCoord[0]);
the link contains the fix.
It is an ati bug i think since gfxstyler said the glsl irrlicht sample doesnt work(only assembler did) on his ati card.
the best solution would be hlsl but from what i have tried the irrlicht hlsl only accepts the first texture...
Still doesn't work.
Shaderdesigner says for final.frag:
ERROR: 0:6: 'uniform' : cannot initialize this type of qualifier
ERROR: 0:7: 'uniform' : cannot initialize this type of qualifier
ERROR: 0:14: 'assign' : l-value required "gl_TexCoord" (can't modify a varying)
ERROR: 0:14: 'assign' : cannot convert from 'const int' to 'float'
ERROR: 0:15: 'assign' : l-value required "gl_TexCoord" (can't modify a varying)
ERROR: 0:15: 'assign' : cannot convert from 'const int' to 'float'
ERROR: 0:16: 'assign' : l-value required "Exposure" (can't modify a uniform)
ERROR: 0:17: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:19: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:19: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: 'assign' : cannot convert from 'const int' to '4-component vector of float'
ERROR: 0:23: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:23: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:24: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:24: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '+' : wrong operand types no operation '+' exists that takes a left-hand operand of type 'const int' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: 0:26: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: 0:26: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type '4-component vector of float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 20 compilation errors. No code generated.
Shaderdesigner says for final.frag:
ERROR: 0:6: 'uniform' : cannot initialize this type of qualifier
ERROR: 0:7: 'uniform' : cannot initialize this type of qualifier
ERROR: 0:14: 'assign' : l-value required "gl_TexCoord" (can't modify a varying)
ERROR: 0:14: 'assign' : cannot convert from 'const int' to 'float'
ERROR: 0:15: 'assign' : l-value required "gl_TexCoord" (can't modify a varying)
ERROR: 0:15: 'assign' : cannot convert from 'const int' to 'float'
ERROR: 0:16: 'assign' : l-value required "Exposure" (can't modify a uniform)
ERROR: 0:17: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:19: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:19: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: 'assign' : cannot convert from 'const int' to '4-component vector of float'
ERROR: 0:23: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:23: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:24: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:24: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '+' : wrong operand types no operation '+' exists that takes a left-hand operand of type 'const int' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: 0:26: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: 0:26: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type '4-component vector of float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 20 compilation errors. No code generated.
Hirte if your shader IDE doesnt know what a uniform is it must be a hlsl/cg one or a very stupid glsl one
Yesterday i decieded to experiment quickly and i produced the above shader.
Its basically an automatic splatter for terrains it is fed with 2(or more when the new irr version comes out) textures such as grass and stone and then it automatically merges them based on height or steepness(calculated via normals) of the terrain
as you can see in the pic the steep mountains are in stone while the flat palins are in grass.
this unlike spinitz's method doesnt require large alpha maps or any other forms of precalculated data [/img]
Yesterday i decieded to experiment quickly and i produced the above shader.
Its basically an automatic splatter for terrains it is fed with 2(or more when the new irr version comes out) textures such as grass and stone and then it automatically merges them based on height or steepness(calculated via normals) of the terrain
as you can see in the pic the steep mountains are in stone while the flat palins are in grass.
this unlike spinitz's method doesnt require large alpha maps or any other forms of precalculated data [/img]
-
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
Ok i was trying to do softshaddows with tradtional methods of placing a camera at a light and capturing the images of the shaddow making object then projecting that but that method became too slow when many nodes where used as the too many render targets acted as a limiting factor no matter how simple the scene was
therefore i made my own method that utilises stencil shaddows then blurs them, this method means only one rendertarget is used no matter how many shaddow nodes are used, the stencil shaddow output is then blurred and used.
here is the result
this required allot of manipulation to irrlichts rendering orders but it only changes smg->drawALL() to smgr->drawALL(shaddow)
therefore i made my own method that utilises stencil shaddows then blurs them, this method means only one rendertarget is used no matter how many shaddow nodes are used, the stencil shaddow output is then blurred and used.
here is the result
this required allot of manipulation to irrlichts rendering orders but it only changes smg->drawALL() to smgr->drawALL(shaddow)
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
Thanks needforhint, btw have you managed to run more than one texture in HLSL because i cant manged to do that.
Ok i manged to complete the infinite lights shader
Currently i can run upto six lights simultanously on my very weak fx5200 card, more lights than this then they are stored by a lights manager so when the become influencial they are activated.
The lights manager identifies weather a light would be chosen to be rendered via a prioritisiation calculation which is quite simply
priority=lightradius-lightdist;
lights that are too weak are discarded unless we become near them and strong but far lights such as "suns" are not ignored. This solves the common problems that arise by simply distance sorting.
Ok what if someone says "My Gpu is very powerful, why would i be stuck with 6 lights?"
well the shader as i mentioned before is self generating and can expand automatically as the hardware get more powerful, the limit here is not due
code nor exceeding allowed instruction limits but the fact that shaders can only recieve a limited number of "uniform variables" which are very important for getting data from the cpu to the gpu
This is a hardware limit i cannot exceed and varies with each card.
The documentation im reading doesnt clearly state if the limit applies to how many uniforms or how bug they are so i might be able to add more lights through packing data in matrices
The infinte lights shader also integrates seamlessly with the softshaddows
( the codes never mix) and the terrain splatter can be achieved by add 2-3 lines of code
im also investigating Lightmaping mixing with the dynamic lighting shader, i managed to load and mix lightmaps but the texturecoords are strange so ill investigate.
The shader emulates bumpmapping and specular mapping using my own custom technique, the user only supplies one color map and the shader generates specular and bump data and uses it on the fly.
this shader doesnt need tangents or binomials so it can work on animated meshes very easily
Here is a quick test of the shader
as you can see, there are diffrent levels of specularity and bumppatterns on the grass which is diffrent from the metal walls, this is generated automatically with no interfernce to the irrlicht format loaders.
Hopefully i might add a new idea that came to me, Stencil Lights, which would perform like my softshaddow exaple but act as a fast cheap illumination method that looks Per-pixel but actually isnt
Im also been working on a game engine core with many feature(all these shaders are integrated in it) that i will share and people can join in its devlopment
Ok i manged to complete the infinite lights shader
Currently i can run upto six lights simultanously on my very weak fx5200 card, more lights than this then they are stored by a lights manager so when the become influencial they are activated.
The lights manager identifies weather a light would be chosen to be rendered via a prioritisiation calculation which is quite simply
priority=lightradius-lightdist;
lights that are too weak are discarded unless we become near them and strong but far lights such as "suns" are not ignored. This solves the common problems that arise by simply distance sorting.
Ok what if someone says "My Gpu is very powerful, why would i be stuck with 6 lights?"
well the shader as i mentioned before is self generating and can expand automatically as the hardware get more powerful, the limit here is not due
code nor exceeding allowed instruction limits but the fact that shaders can only recieve a limited number of "uniform variables" which are very important for getting data from the cpu to the gpu
This is a hardware limit i cannot exceed and varies with each card.
The documentation im reading doesnt clearly state if the limit applies to how many uniforms or how bug they are so i might be able to add more lights through packing data in matrices
The infinte lights shader also integrates seamlessly with the softshaddows
( the codes never mix) and the terrain splatter can be achieved by add 2-3 lines of code
im also investigating Lightmaping mixing with the dynamic lighting shader, i managed to load and mix lightmaps but the texturecoords are strange so ill investigate.
The shader emulates bumpmapping and specular mapping using my own custom technique, the user only supplies one color map and the shader generates specular and bump data and uses it on the fly.
this shader doesnt need tangents or binomials so it can work on animated meshes very easily
Here is a quick test of the shader
as you can see, there are diffrent levels of specularity and bumppatterns on the grass which is diffrent from the metal walls, this is generated automatically with no interfernce to the irrlicht format loaders.
Hopefully i might add a new idea that came to me, Stencil Lights, which would perform like my softshaddow exaple but act as a fast cheap illumination method that looks Per-pixel but actually isnt
Im also been working on a game engine core with many feature(all these shaders are integrated in it) that i will share and people can join in its devlopment
-
- Posts: 518
- Joined: Tue Mar 29, 2005 9:02 pm
- Location: Alex,Egypt
- Contact:
as usual, great work Omer.
can not wait to test that Engine.
keep up the good works.
can not wait to test that Engine.
keep up the good works.
Magic 2d Library For Irrlicht : http://www.freewebs.com/bcxgl/index.htm
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
Needforhint FX 5200 series is the worst thing ever - belive me. I had this card for a looong time and everything was running like a thriller.
FX series is 'popular' of it's worst shader support ever made. Nvidia wanted to make this series a brand superb shader graphics card but it was a big mistake lol. (they screwed it up)
Now I've switched to Nvidia 6600 series 256mb/128 bus on board and it rulez - even Oblivion works pro with hdr XD (shader model 3.0)
Omaremad your effects were working to me tragically too on FX 5200 - so I know what do you mean but now there is a 1000% speed up after changing card - so my advice to you get a new card to continue your cool stuff.
PS I can't wait to test this lights with a demo and these shadows ...
Im really waiting for release.
FX series is 'popular' of it's worst shader support ever made. Nvidia wanted to make this series a brand superb shader graphics card but it was a big mistake lol. (they screwed it up)
Now I've switched to Nvidia 6600 series 256mb/128 bus on board and it rulez - even Oblivion works pro with hdr XD (shader model 3.0)
Omaremad your effects were working to me tragically too on FX 5200 - so I know what do you mean but now there is a 1000% speed up after changing card - so my advice to you get a new card to continue your cool stuff.
PS I can't wait to test this lights with a demo and these shadows ...
Im really waiting for release.
a screen of the water shader, the shader also deals with displacements and coordinates with the cpu some water based physics
as you can see the reflection repeats twice(i am trying to fix the texture projection)
Edit note the caustics are fakes and the distortions are process using my own trick rather than bumpmapping which makes the shader quite fast