Demo Code: Sample RenderMonkey Code

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

After playing around with the code, here's what I got so far. Not pretty at the moment, tho.

Parallax Occlusion Shader Demo. First run.

Looks like the pixel is being pushed at a different axis.

Image
Last edited by dlangdev on Wed Oct 29, 2008 7:29 pm, edited 2 times in total.
Image
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

dlangdev wrote:Turns out someone wrote a GLSL Parallax Occlusion Mapping program and it is published here...

http://3d.benjamin-thaut.de/?p=3

Anyway...
Just curious...you know that shader requires a DX10 card or greater that supports GL_EXT_gpu_shader4, right?

So you could still work on implementing your own. I wouldn't say, in this day, that using the geometry shader is the best choice. So you could still give it a go, if you wanted.
TheQuestion = 2B || !2B
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

I'm testing on an XP SP3 with a Geforce 8500 at the moment. Looks OK so far.

Hmm, maybe not...
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's another one...

http://www.ziggyware.com/readarticle.php?article_id=47

It's written in HLSL, which--oh my--not my forte.

Anyway...
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's another test...using GLSL code.

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's another try...parallax occlusion mapping glsl.

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Getting closer.

Parallax Occlusion Mapping in GLSL

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Hmmm, this one reminds me of Omaremad's bump-n-heightmap tool. Looks like I need to send him a PM.
Image
Post Reply