|
|
portalclip and shader
#151249
08/30/07 20:55
08/30/07 20:55
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
OP
Expert
|
OP
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
I´ve got a good looking multitextureshader and a great watershader. Now I want the Watershader to reflect the terrain with the shader. So far everything works fine but I´ve got the problem that the reflection of the terrain is only visible at the lower half of the screen. I found out that it has to do with portalclip. It doesn´t happen if I set noshader to on for the mirrorview. It would be great if someone can tell me a solution for this  Thanks, Slin
|
|
|
Re: portalclip and shader
[Re: Slin]
#151250
08/31/07 04:00
08/31/07 04:00
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
portal clip is only along a plane, so it shouldn't cause your problem...
...a screenshot would really help.
Also, are you sure it's not the way the shaders rendering the image? This is the big problem I had with the portal system...
xXxGuitar511 - Programmer
|
|
|
Re: portalclip and shader
[Re: Slin]
#151252
08/31/07 21:04
08/31/07 21:04
|
Joined: Mar 2006
Posts: 2,252
Hummel
Expert
|
Expert
Joined: Mar 2006
Posts: 2,252
|
The portalclip feature of the engine doesn´t works when a modell with shader is clipping by it(your terrain). You have to use the noshader flag ...or create a clipplan with the HLSL function clip(x) in your terrain-pixel-shader-> it clips the pixel if x<0 and so you can use you terrain shader with the water.
Last edited by Hummel; 08/31/07 21:05.
|
|
|
Re: portalclip and shader
[Re: Hummel]
#151253
09/03/07 10:26
09/03/07 10:26
|
Joined: Aug 2005
Posts: 512 Bayern
Schmerzmittel
User
|
User
Joined: Aug 2005
Posts: 512
Bayern
|
How can i use this clip function?
Wäre gut, wenn das jemand genauer erklären könnte. Danke
A7 Com V7.80
|
|
|
Re: portalclip and shader
[Re: frazzle]
#151256
09/03/07 19:02
09/03/07 19:02
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
OP
Expert
|
OP
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
I have to call it in the pixelshader right? But how do I get the distance to the clipplane? I think that I´m able to pass the clipplanes (= the waters) z-position to the shader, but I can´t use it without any transformations, can I? With wich matrix do I have to transform it with? And I´m quite sure, that I´ll have to render the terrain with two different shaders depending on the view (one with clipping and one without) right? Thanks for your help 
|
|
|
Re: portalclip and shader
[Re: Hummel]
#151258
09/03/07 19:58
09/03/07 19:58
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
OP
Expert
|
OP
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Though the script looks very ugly  it shows me exactly what I wanted to know. Thank you very much for this example 
Last edited by Slin; 09/03/07 19:59.
|
|
|
|