|
1 registered members (1 invisible),
1,544
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Apply heightmap to vertices on GPU
#412248
11/24/12 16:29
11/24/12 16:29
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
OP
Expert
|
OP
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Hi there,
I'm looking for a way to apply a heightmap to a terrain. I want to do this GPU-side because doing it on the CPU is too slow.
Has anyone got an idea for this?
regards, Alex
POTATO-MAN saves the day! - Random
|
|
|
Re: Apply heightmap to vertices on GPU
[Re: Superku]
#412259
11/24/12 19:06
11/24/12 19:06
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
OP
Expert
|
OP
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Thanks for the answer!
storing the information in an array could work... but I'm not sure if shader model 3.0 supports enough indices for doing this.
POTATO-MAN saves the day! - Random
|
|
|
Re: Apply heightmap to vertices on GPU
[Re: HeelX]
#412437
11/27/12 13:50
11/27/12 13:50
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
OP
Expert
|
OP
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
another question, is it possible to modify vertex positions via shaders I mean constantly modifying, not per frame modification.
Last edited by Kartoffel; 11/27/12 13:51.
POTATO-MAN saves the day! - Random
|
|
|
Re: Apply heightmap to vertices on GPU
[Re: Kartoffel]
#412465
11/27/12 16:57
11/27/12 16:57
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
is it possible to modify vertex positions via shaders I mean constantly modifying, not per frame modification. What do you mean exactly? What do you want to do?
|
|
|
Re: Apply heightmap to vertices on GPU
[Re: Slin]
#412472
11/27/12 18:52
11/27/12 18:52
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
OP
Expert
|
OP
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
What do you mean exactly? What do you want to do? A realtime terrain editor.  My thought was it to have a heightmap I can "draw" on. Within the shader I want to set vertex.y based on the correspondending pixel of the heightmap. You can set them to a value read from a heightmap or from wherever, but this won´t effect the meshs representation within the engine, just the output That's what I wanted to do, but VS doesn't support texture-reading functions like tex2D / 3D / whatever. I also thought about storing the information in an array but SM 3.0 doesn't support enough indices for this method...
Last edited by Kartoffel; 11/27/12 18:56.
POTATO-MAN saves the day! - Random
|
|
|
|