2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: What are you working on?
[Re: Kartoffel]
#412001
11/21/12 21:31
11/21/12 21:31
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
@Kartoffel: Very nice and useful, though Hummel already did this some years (?) ago with his bacterium. I've had a look at the source and it's pretty simple and fast but could even be a little faster:
float zProj = pow(abs(dot(input.Normal, float3(0.f, 1.f, 0.f))), ProjectionPower); is obviously the same as float zProj = pow(abs(input.Normal.y), ProjectionPower); which can be shortened to float zProj = input.Normal.y*input.Normal.y; as ProjectionPower = 2 apparently gives the best results (the same goes for zProjx/y, of course).
EDIT: Thanks for sharing!
Last edited by Superku; 11/21/12 21:31.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: What are you working on?
[Re: Superku]
#412003
11/21/12 21:34
11/21/12 21:34
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
I've had a look at the source and it's pretty simple and fast but could even be a little faster:
float zProj = pow(abs(dot(input.Normal, float3(0.f, 1.f, 0.f))), ProjectionPower); is obviously the same as float zProj = pow(abs(input.Normal.y), ProjectionPower); which can be shortened to float zProj = input.Normal.y*input.Normal.y; as ProjectionPower = 2 apparently gives the best results (the same goes for zProjx/y, of course). oh, of course... didn't see this Thx for pointing this out EDIT: about Hummel's 'Ehec' shader: I saw his shader but I didn't knew he was using the same technique
Last edited by Kartoffel; 11/21/12 21:45.
POTATO-MAN saves the day! - Random
|
|
|
Re: What are you working on?
[Re: HeelX]
#412020
11/21/12 23:26
11/21/12 23:26
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Very cool and very useful. Thanks a lot!!! I'll guess I'll turn that into a terrain shader. looking forward to see the result
POTATO-MAN saves the day! - Random
|
|
|
Re: What are you working on?
[Re: Kartoffel]
#412121
11/22/12 22:37
11/22/12 22:37
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
X
|
X
Joined: Jul 2008
Posts: 2,107
Germany
|
@Kartoffel Sounds cool. I have no clue of making shaders, iam happy i can use them Hope ull find some time to work on that project. edit: @sivan How much FPS do u have right now ?
Last edited by rayp; 11/22/12 22:39.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
|