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.

FPSC Classic Product Chat / Any people with knowledge about shaders around here ?

Author
Message
Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 2nd Jan 2019 09:44 Edited at: 2nd Jan 2019 16:23
Hello, I'm asking this because I'd like to use the water shader provided with Black ice Mod v9 as a refraction shader for glass materials. Which would allow me to get an actual distortion on everything visible behind a glass entity. Just like FPS Creator X10.

I tried to assign the shader to a glass entity but it didn't worked as intended : the shader was making the texture to wobble just like water and opaque.
Is there a way to tweak the shader to make it work like a real refraction shader ? I mean, if it does work on water, it could be tweaked to work on dynamic entities, right ?


Here's a picture of what I'd like to do.


Thank you !
uzi idiot
Valued Member
9
Years of Service
User Offline
Joined: 27th Dec 2009
Location: Who Knows?
Posted: 2nd Jan 2019 16:41
Sadly I've never found a way to do it. It would require the engine to send the entity the screen image as a texture, which as far as I'm aware FPSC doesn't support
If something compiles on the first try. Something is terribly wrong.
Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 2nd Jan 2019 17:28 Edited at: 2nd Jan 2019 17:35
Oh, that's unfortunate.
Thank you !
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Jan 2019 21:59
@ Kaelyss
Quote: "an actual distortion on everything visible behind a glass entity"

Do you mean like on the "other side" of the glass... or a reflection off the glass from behind the player ?
I thought we already had some good glass shaders somewhere ?

@ uzi idiot Didn't you make some glass shaders awhile back
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where
Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 4th Jan 2019 02:45 Edited at: 4th Jan 2019 02:53
Quote: "
Do you mean like on the "other side" of the glass"


Pretty much, it would've been easier to say this, but my english is crap LOL
Here's what I'd like to do (don't mind the animation on the second part).

https://www.youtube.com/watch?v=IAccdvmusOs


Still, I'm puzzled about how/why such an effect can be achieved through water but not with dynamic entities.
uzi idiot
Valued Member
9
Years of Service
User Offline
Joined: 27th Dec 2009
Location: Who Knows?
Posted: 4th Jan 2019 21:23
Quote: "Didn't you make some glass shaders awhile back"

That was just for transparency and specular highlights, it has no distortion.
If something compiles on the first try. Something is terribly wrong.
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Jan 2019 18:49
@ uzi idiot My bad, I could swear you did I did look through my older shaders and found several interesting.
From Evolved, a couple "glass & reflection" shaders. One works really well and distorts using a normal texture.
The UV seems off a bit ??? @ Kaelyss Is this what your after ? ( pics attached )
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where

Attachments

Login to view attachments
Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 5th Jan 2019 21:57 Edited at: 5th Jan 2019 21:58
Nah, it doesn't distorts the background. Don't bother, it seems that it can't be done with FPSC Classic.
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 10th Jan 2019 11:26
@ Kaelyss
Quote: ", it seems that it can't be done with FPSC Classic"

Never say never, looked into a few shaders and found a couple that might
be just what your after. Give me some time to work out some bugs. This is something
I also need for a project I'm on.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jan 2019 17:22
I had some time finally to mess around with some shaders. I found one that takes a diffused texture, sets transparency, and then
the normal blurs/distorts the texture. Kinda works ok ? It's far from perfect, but a start. A better normal might give more distortion ?
I'll keep working on it when I have time
My games never have bugs. They just develop random features..
Lots and lots of random features...
Location: You know that space between a dresser and the floor ? Yeah, that's where

Attachments

Login to view attachments
Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 5th Jun 2019 15:52 Edited at: 5th Jun 2019 18:15
Hey, I am re-opening this thread because I got another question about the use of shaders.

Do you know if it's possible to use a color map as the alpha channel of a normal map for static entities, mostly to simulate metals like brass, bismuth, gold or copper ? DXTBmp always converts it as a "256 greyscale" image.


To ncmako
Nah, it's not what I tried to achieve. What I wanted to do back then was a truly refractive glass, just like that.
https://www.youtube.com/watch?v=jnl_3gNIVTo
arrojar entidad y que explote
4
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 6th Jun 2019 01:01
Hi Kaelyss, this is the maximum you can achieve with the refraction effect. It would be nice to find the same refraction effect as in x10.


Kaelyss
User Offline
Joined: 20th Dec 2018
Playing: Doom II
Posted: 6th Jun 2019 09:54 Edited at: 6th Jun 2019 09:54
It seems, yes. I will try this ASAP, thanks for the tut !

Login to post a reply

Server time is: 2019-07-23 13:31:02
Your offset time is: 2019-07-23 13:31:02