tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
428 stars 41 forks source link

support parallax maps #413

Closed Trass3r closed 2 years ago

Trass3r commented 2 years ago

RFC

tonihele commented 2 years ago

It is fine to support new texture types. Did you try this? If I remember correctly, it might need:

mat.setBoolean(“SteepParallax”, true);
mat.setFloat(“ParallaxHeight”, .05f);
Trass3r commented 2 years ago

No without lights (and good displacement maps) you can't really test it. Was just for future use.

tonihele commented 2 years ago

Ok, ready for merge?

Trass3r commented 2 years ago

Looks like 0.05 is already the default: https://github.com/tonihele/OpenKeeper/blob/ef4cef00bad04c7bcc8d119df2b3c05a3083bd1b/assets/MatDefs/LightingSprite.j3md#L50

And without steep it just uses classical PM: https://github.com/tonihele/OpenKeeper/blob/163e77323138ec372ba1d9b6b3c05e3cb1394123/assets/Shaders/LightingSprite.frag#L100

Trass3r commented 2 years ago

I guess this is more interesting: https://github.com/tonihele/OpenKeeper/blob/ef4cef00bad04c7bcc8d119df2b3c05a3083bd1b/assets/MatDefs/LightingSprite.j3md#L46-L47

Trass3r commented 2 years ago

Ok, ready for merge?

Yeah.