Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Interact with the water shader effects
Started by hanhatlinh91vn Mar 04 2016 12:01 AM

2 replies to this topic
water shader effect
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

hanhatlinh91vn

[GLOBAL: userInfoPane.html]
hanhatlinh91vn
  • Enthusiast

  • 32 posts
  • Corona SDK

Hi all:

 

Can i touch or tap or do something in shader effects?. Ex: i move the boat in the water and make wave during move. 

 

Thanks.



[TOPIC: post.html]
#2

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 848 posts
  • Corona SDK

The shader itself lives in its own little universe, unaware of Corona. It only has the information in the texture(s) and anything you've passed in through the kernel's userdata. So it doesn't speak the language of touches and taps.

 

That said, the data you supply can certainly provide this information, e.g. a point where a disturbance happened, its strength (which would be 0 by default), and the time elapsed, which could be used to spread a ripple. (Basically, adapting something like this.)

 

What sort of view do you have in mind? A shader-only effect probably is not enough when seen from the side, for instance, because of surface behaviors, but for top-down might be perfectly reasonable.



[TOPIC: post.html]
#3

hanhatlinh91vn

[GLOBAL: userInfoPane.html]
hanhatlinh91vn
  • Enthusiast

  • 32 posts
  • Corona SDK

thank you so much for your answer.




[topic_controls]
[/topic_controls]