Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Shadders.....

Author
Message
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st May 2007 01:14 Edited at: 31st May 2007 01:15
I'm sorry if I sound a little upset but I've spent the last few hours trying to use some of the shaders of the ultimate shader pack, but I can't seem to use any of them... I simple do this:

The demo shaders only work if I change the tga files to bmp, but the buble shader I can't seem to use it either way....

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 31st May 2007 11:05
Which one is that ('Effectsrockwall.fx')?

.bmp files shouldn't be mandatory. I'd suggest to translate the whole code, as some shaders need feeding at the main loop.
For example, this is the '01 - Objects - No Lights\01 - Metal 1.1 [eMalice]' or 'Metal11.fx' shader:



Does that bubble shader work for you using DBPro?
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st May 2007 18:34
I again Morcilla I've taken your example and I made some of them work. About the bubble shader I don't have DBPro so.. One other thing can you explain me the reason why the need of using vector4 in the example above? From what I understand from the code above, is to give the effect only to the pixels in front of the camera!?

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 1st Jun 2007 11:53
You can always try the DBPro demo version.

The vector4 is needed in this case just to feed the camera position to the shader.

The shader will surely make some calculus based on the camera position. Since this position could change, we send the values every loop:



That's the loading of the vector components. We only need 3 (x,y,z) so the fourth is 0.0 (never try to feed the shader with a vector3, use always vector4).

Now, there is a mistake, because I used the code for some testing.
This :


Should be just this:



That is where we send the vector4 value to the shader, that has it defined inside as "EyePos".

Login to post a reply

Server time is: 2024-09-29 01:18:32
Your offset time is: 2024-09-29 01:18:32