Parallax Mapping example

Started by John Tribe, April 03, 2013, 12:20:52 AM

Previous topic - Next topic

John Tribe

 It's working fine , but...

Is it possible to add mapping after the object is rendered in the word.

more clearly:
1. I have the scene
2. I'm adding the primitive "plane" object.
3. I click on the button to add parallax mapping.

thx in advance.



Best game prices in http://games2see.com

EgonOlsen

Yes, it's possible but complicated. In this case, i think the simplest solution would be to swap the object itself, i.e. create one with parallax and one without and switch between them.

John Tribe

what do you think about  clone object and dispose original object from world, reload settings from my wrapper for cloned object  and then put object with parallax mapping to world?
Best game prices in http://games2see.com

EgonOlsen


John Tribe

#4
I  was about to ask how to make texture repeatable but i find the solution:

this
   vec2 newTexCoord = (texCoord + offset)  ;

change to this:

        vec2 newTexCoord = (texCoord * scaleValue + offset)  ;

putting here if i forget and i couldn't find this on forum.
question: How to make the bump also be repeatable
Best game prices in http://games2see.com