Author Topic: Tasharen Water - How do you reduce the wave speed?  (Read 4262 times)

Disastercake

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 87
  • www.disastercake.com
    • View Profile
    • Disastercake
Tasharen Water - How do you reduce the wave speed?
« on: November 12, 2014, 03:31:55 PM »
I was wondering if there was an exposed variable somewhere on altering how fast the water wave speed moves.  Right now it is rather fast, but I'd like to use the water for sources that require a more subtle movement like ponds and lakes.
Creator of Soul Saga.
http://www.disastercake.com

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water - How do you reduce the wave speed?
« Reply #1 on: November 14, 2014, 05:16:06 AM »
Hmm I don't think I exposed that one. You might need to tweak the shader. I vaguely remember that it's based on the tiling parameter, but I think it's coded to be a specific percentage of that.

Disastercake

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 87
  • www.disastercake.com
    • View Profile
    • Disastercake
Re: Tasharen Water - How do you reduce the wave speed?
« Reply #2 on: November 16, 2014, 04:16:37 PM »
Is it possible to expose that variable?  I'm not too good with shaders which is why I was buying a water package.  I opened up the shader and couldn't wrap my brain around how it was working.  It'd be awesome if you could patch it into the package.
« Last Edit: November 17, 2014, 01:45:46 AM by Disastercake »
Creator of Soul Saga.
http://www.disastercake.com

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water - How do you reduce the wave speed?
« Reply #3 on: November 17, 2014, 08:32:10 AM »
Look for lines "float offset = _Time.x * 0.5;"
Tiling is calculated right below that:
  1. half4 nmap = (tex2D(_WaterTex, tiling + offset) + tex2D(_WaterTex, half2(-tiling.y, tiling.x) - offset)) * 0.5;
If you want to speed it up, change "_Time.x * 0.5" to something else. For example "_Time.x * 2.0".

Disastercake

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 87
  • www.disastercake.com
    • View Profile
    • Disastercake
Re: Tasharen Water - How do you reduce the wave speed?
« Reply #4 on: November 20, 2014, 04:00:18 AM »
This worked.  Thank you! =D
Creator of Soul Saga.
http://www.disastercake.com