IRR|Cinema studio: some water for the thirsty

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

gfxstyler wrote:same here (glsl shader failed to compile)

seems to be some nasty ati bug ...

ATI CARDS SUCK BADLY!
Seems it is not an ATI problem because I got the same result and glsl shader compile errors with GeForce 6600.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

ahhh sorry i uploaded faulty shaders :oops: (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...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

OK, thanks. It's runs well after fix.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Hirte
Posts: 73
Joined: Sat Apr 01, 2006 1:32 pm

Post by Hirte »

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.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Hirte if your shader IDE doesnt know what a uniform is it must be a hlsl/cg one or a very stupid glsl one


Image


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]
RustyNail
Posts: 168
Joined: Fri Jun 02, 2006 1:49 pm
Contact:

Post by RustyNail »

*Has A Heart Attack* :D
Looks Really Nice, all of it...
I have recently discovered that both the Flu and my Algebra teacher have exact the same effect on my health: it quickly degrades.
Cristian
Posts: 55
Joined: Fri Nov 25, 2005 12:02 pm

Post by Cristian »

I just got a black screen , no errors.
(GeForce FX5200)

EDIT:
Got something on screen... but t'is wierd

Image
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

omaremad try it without specular lighting. Right now it looks as if a giant snail just moved over it. :)
No offense :)
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

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)
Image
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

:shock: yeah,

you are a genious!
what is this thing...
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

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


Image

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
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

as usual, great work Omer.

can not wait to test that Engine.

keep up the good works.
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

fx5200 card might be just to week to handle two maps , but I got two layers in my HLSL with ATI Radeon 9100 . Try to test your 2 layer shaders on a better graph card, personly I don't know how much is the fx5200 valid or powerfull.
what is this thing...
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

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 ... :shock:

Im really waiting for release.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Image

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
Post Reply